sum1(1, 2, 3) == 6
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
GET / => hello
GET /say/{FOO} => You said: $FOO
POST /send_message
Expected post body should be NAME=$NAME&MESSAGE=$MESSAGE
[IF $NAME=="BOB"]
=> {"valid":true, "message": $MESSAGE}
[ELSE]
=> {"valid":false, "error": "$NAME is not allowed to post messages"}
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)