Given that, it’s remarkable how coding interviews select for the exact opposite set of behaviors.
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
What was the response?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Keep cache keys, load the values if and when you need them.
-
Nope, you failed the interview. You’re supposed to use the Tortoise and the Hare algorithm. OBVIOUSLY.
- 2 more replies
New conversation -
-
-
at some point I learned that depth-first traversal of a graph plus a memoization map can be abused to detect cycles: instead of leaving an entry for a key x empty when entering f(x), you place an "in progress marker" - if you see that further down, cycle!
-
I would totally use this even for a linked list, because of how deviously powerful it is with just one map and no other fancy data structures also, if f has some helpful properties, you could even repeat the work within f(x) (once detecting a cycle) in a loop to get a fixpoint!
End of conversation
New conversation -
-
-
Good point, I’m interested in a twist for our next interview: do you have a task at hand where the first google/SO hits are wrong/misleading?
New conversation -
-
-
The results for “making money from submitting web forms” isn’t that useful.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This Tweet is unavailable.
-
Ah yes, the golden age of punch cards
End of conversation
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.