Interview Round DistributionClick any round below to filter
Topics:
Showing 20 of 101 results for PendoPage 1 of 6
Coding
48
Top K Frequent Elements
Find the top K frequent elements in an array.
Input: nums = [4,4,4,4,5,5,6], k = 1
Output: [4]
Explanation: The number 4 appears four times, easily making it the single most frequent element in the data structure.
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.
Merge two sorted arrays into one sorted array.
You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge them into a single array sorted in non-decreasing order.
Input: nums1 = [0], m = 0, nums2 = [1], n = 1
Outp…
Longest Consecutive Sequence
Determine the length of the longest consecutive elements sequence.
Input: nums = [0,3,7,2,5,8,4,6,0,1]
Output: 9
Explanation: The longest consecutive sequence is 0 through 8 (length 9), utilizing a hash set to check connectivity in linear time.
Minimum Window Substring
Find the minimum window substring that contains all characters of another string.
Input: s = "a", t = "aa"
Output: "" (Empty String)
Explanation: The target requires two 'a's, but the source string only contains one, making it impossible to form a valid window.