4 ms·
Most of the time I hear the term being used by other people (not you :) ), I feel it's for showing off and look smarter than everybody else - "Look, I used dyna
by glimshe 3y ago
Most of the time I hear the term being used by other people (not you :) ), I feel it's for showing off and look smarter than everybody else - "Look, I used dynamic programming to solve that problem", when in fact they were just employing what I'd consider the natural and intuitive approach for solving the problem. There was nothing they actually "used", besides happening to identify that the problem could be broken into progressively smaller subproblems.
- valval 3y agoWell aren’t you cynical.
- mk89 3y ago> happening to identify that the problem could be broken into progressively smaller subproblems. Which is what dynamic programming is about. And no, not everyone is capable to do that, especially since not all problems solved at work are Leetcode. Sometimes people really have to spend hours or days to understand how to split a problem. Only then optimizations can be applied or become "obvious". Like usual, solutions are "so obvious" when someone has done a lot of heavy lifting to simplify the problem, improve the context, etc.
- bcrosby95 3y agoDo you feel similarly if someone says they used an iterative, recursive, or greedy algorithm? Dynamic programming is a whole chapter in most algorithms books. It's not about showing off, it's the name of the technique.
- throwaway2037 3y agoAs I interpret the GP, the person is peacocking or gate-keeping by (humble)bragging about using dynamic programming to solve a problem. For all we know, they Googled for an efficient algorithm and copied the result. I have done it before, and I have no shame about it. If a teammate asks me how I knew about that dynamic programming algorithm, I would reply: "Are you joking? I could never program that myself. Thank you Google." Except for a few algorithms, most are solved using iterative or recursive.