Can /g/ solve a random medium 2d dynamic programming problem if they were given one right now?
>>108954378no, I only tackle dynamic programming between the hours of 1pm-4pm, and 9pm-1am in December
>>108954378Maybe...
>be me>do leetcode for 3 months>recursion recursion recursion recursion recursion recursion recursion recursion recursion recursion recursion recursion >stop doing leetcode and go back to writing code>not a single use case for recursion ever except maybe some basic bitch backtracking maybeit's all bullshit
>>108954391Is there any recursive implementation that isn't outperformed by a loop?
>>108954398no, because recursion will always introduce overhead and unnecessary memory fuckery
>>108954398Recursion with tail call optimization which is basically a loop so no.
Dynamic programming is easy once you realize you can use an associative array. Half of the complexity is doing it 80s style with a 2d array.
>>108954378I have no idea what that even fucking means.>>108954391clang-tidy actually flags recursion as something you're not supposed to do.
>>108954539>what that even fucking meansNocoder detected
>>108954391I force myself to not use recursion on my solutions, so I wirte a lot of backwards for loops.
>>108954378No, medium problem are gay and you rarely see them except on leet code/interview.
>>108954391>>stop doing leetcode and go back to writing codeI'm a regular coder and I'm pretty sure I've used recursion at some point in every single job I've had in the past 20 years.It's not something I use every day or every week though.
>>108954378I can do all hard dynamic programming problems in 10-15m max even without ever having seen it before. That's because the past 15 years professional duties revolved so heavily around dynamic programming-based algorithms, so it's really a coincidence. Other hards, forget it. Other mediums I have to mostly memorize to get within the time allocated.
>>108954497lmao nocoder>>108954527correct
>>108954545Actual programmer who makes stuff not fucking around with retarded jeetcode exercises.