5

Scheduled an on-site. *internal screaming*

Does anyone have any resources for studying distributed computing and operating system topics or have any pointers for studying for a systems design interview?

Also, how did y’all get comfortable with recursion? I don’t have issues with problems I already know the solutions to but it’s like when that’s not the case my brain just goes into panic mode for a bit.

Teach me your ways?

Comments
  • 1
    char *ptr; /*a pointer*/

    Recursion is basically a sort of loop. Every recursion has an iterative equivalent. Loops are easy because you see the loop variable that stores the state, right?

    Recursion can seem confusing because the state is somewhat hidden in the call stack which tells you at what recursion level you are.

    Unless you have tail call optimisation so that there is no call stack, in which case the compiler is clever enough to figure out an iterative equivalent of the recursion, i.e. a loop.
  • 2
    @Fast-Nop I think it mainly comes down to having trouble figuring out how to establish the base case. Like, picking the problem apart to see how it goes together. Maybe it’s just a practice thing.
  • 0
    Remember that recursion is risky. Always make sure your condition will be met for all inputs.
  • 0
    How i got to feel recursion was learning prolog. Any kind of lisp or haskell will also help a lot. Imo other languages don't lend themselves for recursion and that's why many people find it hard.
  • 1
    is this your first onsite?
  • 1
    @toriyuno It was, yeah.
  • 1
    @AmyShackles that’s very rough for Amazon to your first on-site =/
Add Comment