Onsite interview questions

  • 0
    1. Some weird question related to his day job. Too many details to recall.
    2. ML interview discussion followed by code up TFIDF.
    3. Given two n-ary trees, suppose first tree has leaf nodes 1, 2, 3, 4 and second one has 1, 2, 5, 6, then return (3, 5) which is the place in leaf node iteration where they first mismatch.
    4. Design leaderboard class. Requires methods insert(player_id, score) and get_player(rank). Needed to use BST with order statistics.
    • Given an array of scores in the range [0, 100] get the 95th percentile score.
    • Find connected components in a graph (not the exact question but pretty easy to figure out that this was needed for the question).

  • 0


    1. post-order simulataneous traversal of 2 n-ary trees?
    2. hashtable of player_id --> treeNodes plus a BST?
    3. (1) not sure what's the time complexity requirement so as not to sort it? and I assume the array size is much bigger than 100? in that case it's analogous to "find the kth element" question? (2) marked visit DFS?

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.