Interview Round DistributionClick any round below to filter
Topics:
Showing 20 of 102 results for WorkivaPage 1 of 6
Coding
48
Find the lowest common ancestor of a binary tree.
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. The LCA is defined between two nodes p and q as the lowest node in the tree that has both p and q as descendants.
Input: root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 4
Output: 5
Explanation:…
Palindrome After Deleting One Character
Determine if a string can be a palindrome after deleting at most one character.
Input: s = "abc"
Output: FALSE
Explanation: Deleting any single character leaves either "ab", "bc", or "ac", none of which result in a valid palindrome.
Clone an Undirected Graph
Clone an undirected graph.
Input: adjList = [[]]
Output: [[]]
Explanation: Creates a new, deeply cloned graph containing only one single node with zero connected neighbors.
Find the shortest distance from all buildings to an empty land in a grid.
You are given a grid of values 0, 1, or 2, where 0 is empty land, 1 is a building, and 2 is an obstacle. Find the shortest travel distance from all buildings to an empty land spot.
Input: grid = [[1,0],[0,1]]
Output: 2
Explanation: The empty lands are at (0,1) a…
Maximum Subarray Sum
Find the maximum subarray sum in an integer array.
Input: nums = [-3,-4,-1,-2]
Output: -1
Explanation: Kadane's algorithm correctly identifies that the single isolated element -1 provides the highest possible sum.