re: Advent of code Day 2 Part 2 Complexity VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

As I said to @tiago the purpose for this exercise is just fun.

I think that it would be hard implementation-wise but I was thinking a DFS that backtracked whenever the second different character was found. It would be hard keeping track of the number of different characters found for a given node but not impossible.

code of conduct - report abuse