Interview Round DistributionClick any round below to filter
Topics:
Showing 20 of 99 results for HomeAwayPage 1 of 5
Coding
48
Validate if a given tree is a valid binary search tree.
Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key, and the right subtree contains only nodes with keys greater than the node's key…
Merge Overlapping Intervals
Merge overlapping intervals in an array.
Input: intervals = [[1,4],[4,5]]
Output: [[1,5]]
Explanation: The intervals touch exactly at the 4 mark, so they are successfully merged into a single continuous interval.
Imagine a situation where a customer is struggling to communicate with you due to a language barrier. What steps would you take to ensure their issue is resolved?
Optimal Meeting Point
Calculate the optimal meeting point for multiple people on a 2D grid.
Input: grid = [[1,0],[0,1]]
Output: 2
Explanation: The optimal meeting point is either (0,1) or (1,0), requiring exactly 1 step from each person resulting in a total distance of 2.