Here is a list of extra tips and tricks to streamline your solution. If we have enough repositories listed, we'll call out some exceptional solutions as well.
BEAR IN MIND - there may be spoilers reading through this.
- Part 1 - Do you know the difference in Python between
/and//? - Part 1 - Can you solve part one in just one expression (Hint:
sum()and comprehensions are your friend.) - Part 2 - Can you solve the problem recursively?
- Part 2 - Can you solve it without any if statements?
- Part 1 - OpCodes sound like a great Enum (maybe an IntEnum). You should go check out IntEnum.
- Part 1 - Can you grab all three addresses of an instruction in one assignment?
- Part 2 - Did you nest your for loops for noun and verb? Check out
product()in theitertoolslibrary
- Part 1 - Intersections, eh? Maybe you want to check out
set() - Part 1 - Did you know
min()takes a key argument? Can you use that? - Part 2 - Consider tracking length with
enumerate()
- Part 1 - Can you solve the problem using regular expressions and backreferences?
- Part 1 - Can you solve the problem with
groupby()from theitertoolslibrary? - Part 2 - Can you solve it with a regex? Do you know the difference betweene
re.findallandre.finditer?
- Part 1 - ParameterMode looks like a great use of Flag or IntFlag
- Part 2 - Can you refactor your computer out so it can be used for day 2 or day 5?
- Part 1 - Can you solve the problem recursively?
- Part 2 - Can you solve the problem using Dijkstra's algorithm?
- Part 1 - Can you use
permutationsin theitertoolslibrary? - Part 2 - Can you solve the problem using
ThreadsandQueues?
- Part 1 - Did you know about the
countmethod on collections? - Part 2 - Were you able to
zipanywhere?
- No challenges yet
- Part 1 - Do you know about
defaultdict. - Part 2 - Do you know about
atan2? How aboutcyclefrom itertools?
- Do you know about
%. Can you write your turn and move without any if statements?
- This one is hard enough, do you really need another challenge?
- This is the second program that you need your computer to have different input and output functions. Can you generalize your computer to pass in different functions at construction time based on what input/output should be?
- Can you solve it with the
Counterclass fromcollections?
- No challenges yet