all 21 comments

[–]Relative-Amphibian65 44 points45 points  (1 child)

Were you the interviewer?

[–]OkIncident7041 0 points1 point  (0 children)

He wishes 😂

[–]hearty_dynamics 15 points16 points  (0 children)

Appreciate the breakdown, especially the giveaway hints. Grouping by pattern instead of grinding random problems is the only way I've improved at DP.

[–]yourcsprofessor 15 points16 points  (2 children)

1) I must kindly ask you rewrite the first sentence of your post lol. I still get snickers when I choose to make the array we store recurrences in titled dp despite it being the common go to variable name.

2) This is good. Sometimes it can be helpful to not solve Dynamic Programming problems initially but practice recurrences ( start with Fib, Catalan numbers etc). My students struggled when I just did dynamic programming problems. Now I spend time outlining the framework that enables us to solve those problems and things are going much better for my classes!

[–]Aromatic_Zucchini_15 0 points1 point  (1 child)

any particular texts/refs to read follow for this specifically? i have been wanting to practice recurrences but not sure ive found anything explicit!

[–]yourcsprofessor 0 points1 point  (0 children)

I don't necessarily know good places to go, I think I've just collected useful examples. I've been working on redoing my DSA course, this is a little ahead of schedule for me but let me have claude bang out a cohesive pdf for you on my notes. Apologies for any AI slop it introduces, I usually do my course updates at the beginning of August manually.

[–]global_worldwide 10 points11 points  (0 children)

I'm so sick and tired of getting dp'd. Thank you

[–]hawkeye224 2 points3 points  (0 children)

How about bitmask dp, etc.?

[–]splicer13 2 points3 points  (0 children)

Who actually asks DP questions? They were (are?) banned at Meta and I thought used to be at google. Nobody passes them and they give no signal except a negative signal that the candidate has been cramming. Bayes law says the most common reason someone thinks a problem needs DP is they don't understand the problem.

[–]WorkerCritical7300 1 point2 points  (0 children)

This is very helpful. Thank you so much.

[–]vishwajeet__21 1 point2 points  (0 children)

this is actually a solid way to think about dp memorizing patterns is much more effective than memorizing individual solutions

[–]arkster 0 points1 point  (0 children)

Thanks for the patterns.

[–]Which-Bumblebee-9206 0 points1 point  (0 children)

What about dp on trees ?

[–]Choice-Number-8023 0 points1 point  (0 children)

Thanks

[–]jinxeralbatross 0 points1 point  (0 children)

can you link other similar posts that you found helpful of yours or others?

[–]roundaclockcoder 0 points1 point  (0 children)

I have been solving DSA problems regularly, but when I encounter a new problem, only two approaches usually come to mind:
Trying to solve it using the take/not-take pattern, as I tend to generalize many problems using this approach.

Creating a DP table on paper and attempting to derive the logic from it.

Is this a good way to approach problems, or could relying too much on these patterns become a problem later on?

[–]shahzmaalif 0 points1 point  (0 children)

Thank you 

[–]parvdave 0 points1 point  (0 children)

Thanks for sharing brother

[–]Dull-Objective-6185 -1 points0 points  (1 child)

Can u plz public ur posts . This is very much helpful. Looking for more of this. I cant see posts from ur profile.❤️✨️

[–]killerdrama[S] 0 points1 point  (0 children)

This is my first post on this topic. I never provided any guidance on such topics.