Skip to content

Instantly share code, notes, and snippets.

@anderZubi
Created March 13, 2014 09:05
Show Gist options
  • Save anderZubi/9524795 to your computer and use it in GitHub Desktop.
Save anderZubi/9524795 to your computer and use it in GitHub Desktop.
package main
import "fmt"
func main() {
BinaryCount(3, "")
}
func BinaryCount(n int, result string){
if n == len(result) {
fmt.Println(result)
} else {
BinaryCount(n, result + "0")
BinaryCount(n, result + "1")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment