We know that recursion and backtracking have exponential time complexity so why companies keen to ask their questions because in practice we deal with large values of N for which both are inefficient just a general doubt
General recursion doubt
Hey @coderajay03 first let me clear this that recursion and backtracking is different from recursion and is also different from backtracking. As you can see there are total 3 categories : recursion, backtracking, recursion and backtracking. Companies prefer to ask questions of recursion and backtracking which have fixed space & time constraints that can be solved in 10^9 iterations. If they want more optimised solution then ofcourse you would change your implementation and will think of an iterative approach and let me tell you that is acceptable. There are very few problems which would be solved using recursion and backtracking and can’t be plved in 10^9 iterations. Moreover you would solve questions of backtracking seperately which would be like longestValidParentheses and many more
yeah I completed that backtracking section was just asking .
Please don’t forget to mark your doubt as resolved.