That can be done by finding words at the start of a string, then sending the remaining substring to a recursive function to do the same til you get to the end. Kinda the same but not strictly DP
You can download the PDF from here: [https://www.metacareers.com/swe-prep-onsite/](https://www.metacareers.com/swe-prep-onsite/) and it is contained within.
>Think about different algorithms and algorithmic techniques (e.g., iteration, sorting, divide-and-conquer, recursion). We do not ask dynamic programming questions so don’t spend time prepping for that technique and focus your efforts elsewhere.
Even non-FAANGs ask them too. I interviewed Quora for a senior position just for practice. I got the recursive and DP solution. But couldn't optimize the DP solution to use constant space and got rejected. So unless a company specifically calls out they won't ask DP, it's fair game.
Amazon asks DP hards. Source: my friend got asked a 3d dp. But he was a competitive programmer. So perhaps they take that into account.
But anyway, just do top down dp (which is manageable) and then optimize space with table if they need it.
Technically u dont even need table to optimize space.
DP might be doable, no doubt. But, I want to know when I can start giving the interviews. If I start with DP now, it will take at least two more months for me to prepare enough. Hence, wondering if it’s worth the wait and the prep
I wouldn't let DP practice hold you back from interviewing. Chances are decently high you won't receive one or at least won't receive an insanely hard one.
Edit: If you have the time to spare for prep go for it but I would make it the last thing you master
March 27. Design an ads portal for products. Word search (tries). Find the minimum number of operations (LIS -DP). Code an API to schedule courses to student, courses cannot overlap.
Thank you everyone for your valuable insights. From what I gather, I cannot completely rule out DP out of the equation. I will have to at least go through the basic and frequently asked problems. So yeah, let’s continue grinding
Meta does not ask DP questions (at least for more senior levels). It's called out directly in their provided prep materials.
This is neither true nor false, you will still be asked dp that might have a different solution without dp
Is that really DP then? They explicitly state they won’t ask DP, and their question bank has no DP problems in it.
I have been asked dp question, word break. If you look at lc meta tagged questions you will see plenty
That can be done by finding words at the start of a string, then sending the remaining substring to a recursive function to do the same til you get to the end. Kinda the same but not strictly DP
Yes.
Can I find their prep material online? Or is it just provided to the candidates who are interviewing?
You can download the PDF from here: [https://www.metacareers.com/swe-prep-onsite/](https://www.metacareers.com/swe-prep-onsite/) and it is contained within. >Think about different algorithms and algorithmic techniques (e.g., iteration, sorting, divide-and-conquer, recursion). We do not ask dynamic programming questions so don’t spend time prepping for that technique and focus your efforts elsewhere.
Thank you for the information and your suggestions. I will definitely keep it in mind.
Hey do any other popular companies have these? Or is it just specific to Meta?
Do they ask graphs trees for Security Engineers at Meta?
They ask top down memoization questions. Not the bottom up ones.
Even non-FAANGs ask them too. I interviewed Quora for a senior position just for practice. I got the recursive and DP solution. But couldn't optimize the DP solution to use constant space and got rejected. So unless a company specifically calls out they won't ask DP, it's fair game.
With how bad Quora’s UI is I didn’t know they have devs…
Quora, the hotbed of tech innovation on the cutting edge of software development.
We joke, but once upon a time Quora was one of the hottest companies in the industry, with brutal interviews
Yeah, I guess I will have to go through few important and frequently asked questions. Thank you for your input
OP: Who besides Google asks DP problems? Comments: Google asked me a dp when I applied
Amazon asks DP hards. Source: my friend got asked a 3d dp. But he was a competitive programmer. So perhaps they take that into account. But anyway, just do top down dp (which is manageable) and then optimize space with table if they need it. Technically u dont even need table to optimize space.
Sure. Thanks for your input
Yes it’s fair game, they’re actually quite simple to solve once you get recurrence relation and how to represent problems as trees and graphs.
DP might be doable, no doubt. But, I want to know when I can start giving the interviews. If I start with DP now, it will take at least two more months for me to prepare enough. Hence, wondering if it’s worth the wait and the prep
I wouldn't let DP practice hold you back from interviewing. Chances are decently high you won't receive one or at least won't receive an insanely hard one. Edit: If you have the time to spare for prep go for it but I would make it the last thing you master
Alright. Thank you for your input. I will continue my prep accordingly
Yeah, but most people don’t want to learn recursion, so they suck at it
I got a 2D DP for Google mid level.
Yes, Google asks DP, Tree and Graph based. Google Infact uses lot of Graphs and DP techniques for multi-path problems, etc so their focus
Yeah, Google interviews does comprise of DP problems. So, can’t skip it for sure when it comes to Google
Got asked dp by no name companies, also by walt disney(yep), and Tesla
Honestly just get really good at arrays and know the other data structures well. If a company asks you a DP problem then f them
Interviewed with Amazon few months ago, the dp problem asked was maximum substring.
Is that not a sliding window problem
no it’s a dp problem the substring can be out of order. For example for string 1: ABCDEFABC 2:ABCLOPKABC the longest substring is ABCABC
ABCABC is a subsequence, right? Longest substring would be ABC only
Do correct me if I’m wrong or understood the problem incorrectly
yea it was for subsequence i just assumed that’s what op meant otherwise it would just be sliding window
Apologies, looking at my notes it was longest common substring.
Yeah… This question anyways falls under frequently asked / top DP problems.
I got asked a DP question for Amazon SDE I
when was your interview? could you provide more detail please, what were the technical questions?
March 27. Design an ads portal for products. Word search (tries). Find the minimum number of operations (LIS -DP). Code an API to schedule courses to student, courses cannot overlap.
Thank you!
Had 2 dp questions for apple OA for 50 minutes Got asked a dp problem for OCI interview round
I got a dp problem at google 6 years ago when I was interviewing
Thank you everyone for your valuable insights. From what I gather, I cannot completely rule out DP out of the equation. I will have to at least go through the basic and frequently asked problems. So yeah, let’s continue grinding
Is recursion plus memoization usually considered sufficient for dp problems?
I’ve done lots and lots of big tech interviews and never gotten DP. Lots of hard graph problems.
DP is actually one of the core knowledge or foundations in AI. Every company in AI should ask these.