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
vector<string> answer; | |
void getStrings( string s, int digitsLeft ) | |
{ | |
if( digitsLeft == 0 ) // the length of string is n | |
answer.push_back( s ); | |
else | |
{ | |
getStrings( s + "0", digitsLeft - 1 ); | |
getStrings( s + "1", digitsLeft - 1 ); |
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
lib = | |
fs : require('fs') | |
u : require('underscore') | |
https : require('https') | |
url : require('url') | |
appendToFile = (data) -> | |
lib.fs.open 'fbdata', 'a', (e, fd) -> | |
lib.fs.write fd, data, null, 'utf8', -> | |
lib.fs.close fd, -> |
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
/** | |
* Data structure and algorithm: Binary Tree | |
* Some action with Binary Tree | |
* | |
* Author: LvDuit (lvduit08 at gmail.com) | |
* Date: 16/06/2014 | |
*/ | |
#include <stdio.h> | |
#include <math.h> |
NewerOlder