[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


Can /g/ solve a random medium 2d dynamic programming problem if they were given one right now?
>>
>>108954378
no, I only tackle dynamic programming between the hours of 1pm-4pm, and 9pm-1am in December
>>
>>108954378
Maybe...
>>
>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 maybe
it's all bullshit
>>
>>108954391
Is there any recursive implementation that isn't outperformed by a loop?
>>
>>108954398
no, because recursion will always introduce overhead and unnecessary memory fuckery
>>
>>108954398
Recursion 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.
>>
>>108954378
I have no idea what that even fucking means.

>>108954391
clang-tidy actually flags recursion as something you're not supposed to do.
>>
>>108954539
>what that even fucking means
Nocoder detected
>>
>>108954391
I force myself to not use recursion on my solutions, so I wirte a lot of backwards for loops.
>>
>>108954378
No, medium problem are gay and you rarely see them except on leet code/interview.
>>
>>108954391
>>stop doing leetcode and go back to writing code

I'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.
>>
>>108954378
I 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.
>>
>>108954497
lmao nocoder
>>108954527
correct
>>
>>108954545
Actual programmer who makes stuff not fucking around with retarded jeetcode exercises.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.