Medium Question from LC. I was asked to get all the possible combinations of a series of "musical notes" given the following rules:
Return every possible valid sequence in an array of possible sequences. You may return it in any order.
My approach was to make a DFS algorithm to go through every possible combination. Before calling recursively my function i'd check if it's valid transition and sum is not above 12
Interviewer later would ask me about time and space complexity which was a bit hard for me but came up with exponential order for both. In the worst case scenario
Still missing 1 coding interview and 1 behavioral. Wish me luck!!!