Role: SWE Product
Given a binary tree (NOT BST), print the column traversal from leftmost column to rightmost column. If two nodes are in the "same column", the top most node in that column should appear before the bottom most node.
Pretty straightforward traversal and very standard LC problem
We are building facebook for mythical creatures called centaurs. Centaurs live much longer than humans and we want to understand the number of friend requests when we launch the app. Here's how centaur friendships work (you will be expected to gather some requirements though b/c the interviewer explained the problem in a confusing way):
At least one of the above rules must be satisfied for a centaur friend request to be valid.
Given a list of ages, return the number of friend requests. Friend requests for centaurs are directional (eg: just because I friend request you doesn't mean you automatically reciprocate the same)
I wasn't able to code up fully working solution for all the rules, but communicated my thought process. I tried the exercise myself just now and it's not too bad if you frame the problem in the right way