Skip to content

Instantly share code, notes, and snippets.

@aymanosman
Last active November 15, 2016 20:20
Show Gist options
  • Save aymanosman/6f2c059cac44a019bf06 to your computer and use it in GitHub Desktop.
Save aymanosman/6f2c059cac44a019bf06 to your computer and use it in GitHub Desktop.
Challenges

Sum

sum1(1, 2, 3) == 6

Fizzbuzz

1 1
2 2
3 Fizz
4 4
5 Buzz
6 Fizz
7 Hiss
8 8
9 Fizz
10 Buzz
11 11
12 Fizz
13 13
14 Hiss
15 FizzBuzz
16 16
17 17
18 Fizz
19 19
20 Buzz
21 FizzHiss

Web

GET / => hello
GET /say/{FOO} => You said: $FOO

Recursion/Generators

class Node():                                       
  def __init__(self, v, children=None):
    self.val = v
    self.children = children

ns = Node(2, [Node(1), Node(3, [Node(4), Node(5)])])
flatten(ns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment