In big-O notation, when multiplying polynomial and exponential complexities, should we maintain the polynomial term in the product, or does the exponential term dominate in the product, prompting us to remove the polynomial?
In Matchsticks to Square, the provided time complexity is O(n*2^n), implying that we should maintain the polynomial.
In Sudoku, the problem prior, the provided time complexity is O(9^(nm)), which seems to exclude the (n+m) term in the product that we use in each frame to determine whether a move is valid, implying that we should exclude the polynomial from the final complexity class.
Course: Grokking Coding Interview Patterns in Python - Learn Interactively
Lesson: Matchsticks to Square - Grokking Coding Interview Patterns in Python