Interview Round DistributionClick any round below to filter
Topics:
Showing 20 of 102 results for AvantPage 1 of 6
Coding
48
Pacific and Atlantic Water Flow
Calculate water flow from a matrix to the Pacific and Atlantic oceans.
Input: heights = [[2,1],[1,2]]
Output: [[0,0],[0,1],[1,0],[1,1]]
Explanation: All cells can flow to both oceans because water can move to adjacent cells of equal or lower height or directly off the edges.
Product of Array Except Self
Calculate the product of an array except for self without using division.
Input: nums = [-1,1,0,-3,3]
Output: [0,0,9,0,0]
Explanation: The single zero zeros out all products except at its own index, which cleanly multiplies the remaining elements.
Search for a Word in a 2D Board
Search for a word in a 2D board of characters.
Input: board = [["C","A","A"],["A","A","A"],["B","C","D"]], word = "AAB"
Output: TRUE
Explanation: DFS traverses adjacent matching letters perfectly, finding "AAB" without improperly revisiting any cells.
Iterator over a Binary Search Tree
Implement an iterator over a binary search tree.
Input: root = [7,3,15,null,null,9,20], calls: next(), hasNext(), next()
Output: 3, TRUE, 7
Explanation: The iterator yields the smallest value (3), confirms more nodes exist, then properly yields the next in-order value (7).
Continuous Subarrays Sum Equals K
Find the total number of continuous subarrays whose sum equals K.
Input: nums = [1,2,3], k = 3
Output: 2
Explanation: Both the contiguous subarray [1,2] and the single-element subarray [3] sum perfectly to the target of 3.