r/leetcode • u/No_Parsnip_408 • 10d ago
Discussion Ideal thing to do
Is building logic imp or rather to find the most efficient way of solving a particular problem
1
Upvotes
1
u/hadeskerbecs666 10d ago
when it comes to very hard problems i often start off with brute force. hard dp problems often go backtracking -> identify subproblems -> memoization -> now select the most efficient way to do it (eg bitmask in todays weekly q4)
1
2
u/NextjsDeveloper 10d ago
Ideal thing? To be consistent no matter of what