This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***************************************************************** | |
Implement a function to check if a tree is balanced | |
For the purposes of this question, a balanced tree is | |
defined to be a tree such that no two leaf Nodes differ | |
in distance from the root by more than one | |
******************************************************************/ | |
#include <iostream> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.cpp | |
// cc4_3 | |
// | |
// Created by gsw on 12-5-9. | |
// Copyright (c) 2012年 __MyCompanyName__. All rights reserved. | |
// | |
/****************************************************************************** | |
* Given a sorted (increasing order) array, write an algorithm to create a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
from tornado.httpserver import HTTPServer | |
from tornado.ioloop import IOLoop | |
from tornado.web import Application, asynchronous, RequestHandler | |
from multiprocessing.pool import ThreadPool | |
_workers = ThreadPool(10) | |
def run_background(func, callback, args=(), kwds={}): | |
def _callback(result): |
OlderNewer