I have an Amazon SDE assesment that I am planning to take in a day or two. Solved a few easy / med CTCI and LC questions. I'm bad at trees / graphs. Am I screwed? Any preparation advice would be appreciated! TIA
Expect medium LCs, probably graph traversal and matrices
Thanks! Any advice on what graph questions I can practice to get a good grasp over them.
Top LC Amazon questions
That's helpful thanks amigo!
First thing you need to do is create classes that describe entities in the problem. My assessment was formulated with tuples and int arrays and things like that. Make some nice classes that take those non-descript objects in the constructor and parse them into something that makes sense. Then continue and you’ll make your life much easier.
I'm not sure I follow. Can you give me an example?
For example, the method declaration they give you will have an input parameter that is an int[] and the problem description will say “The array represents a person. The first member of the array represents their height, the second their gender (0 for male and 1 for female), and the third their weight” — I’m just making it up. What I’m saying is make a class called Person, with three properties (int height, int weight, enum gender) and convert the int array into a Person object before you continue — rather than having to keep track of what’s what in the int array.
Followup question? Is the runtime complexity super important? I usually can get recursive solutions for things, but their complexity sucks balls.
Took the test, got Analed :(
1st question on tries, second LC medium graph
What where the questions?
you're not screwed, you can grind trees and graphs in that time, focus on the most basic applications and know them well. I would review OOP concepts as well
Doing that right now! Thanks :)
Binary trees / BST are still manageable. Tries / AVLs etc f*ck me up