Meta phone screen follow-up
Summary
I had a phone screen follow-up at Meta, which involved two data structures and algorithms questions.
Full Experience
- Given a sorted array and an int k, return the index of first element greater than k.
- given a binary tree imagine yourself standing on left of tree and output a list of nodes that you see from bottom to top, then standing on right hand side of tree output the list of nodes you see from top to bottom
Interview Questions (2)
Find First Element Greater Than K in Sorted Array
Given a sorted array and an integer k, return the index of the first element greater than k.
Binary Tree Left View (Bottom-Up) and Right View (Top-Down)
Given a binary tree, imagine yourself standing on the left side of the tree and output a list of nodes that you see from bottom to top. Then, standing on the right-hand side of the tree, output the list of nodes you see from top to bottom.