Created
February 12, 2020 03:06
-
-
Save colinpollock/f4625b7dff52a32521686db642a3fc34 to your computer and use it in GitHub Desktop.
This file contains 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
a = 'a' | |
b = 'b' | |
c = 'c' | |
d = 'd' | |
def test_empty(): | |
check([], 0) | |
def test_all_one(): | |
check([a, a], 1) | |
check([a, a, a, a], 1) | |
def test_two_types(): | |
check([a, b], 1) | |
check([a, b, a, b], 2) | |
def test_harder(): | |
check([a, a, b, b, c, d], 3) | |
def check(cookies, expected_num_unique_left): | |
assert len(cookies) % 2 == 0 | |
assert num_unique_left(cookies) == expected_num_unique_left |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment