Skip to content

Instantly share code, notes, and snippets.

View duyet's full-sized avatar

duyet duyet

View GitHub Profile
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 );
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, ->
/**
* 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>