Interview Round DistributionClick any round below to filter
Topics:
Showing 20 of 104 results for AirbnbPage 1 of 6
Coding
47
Determine if a Sudoku board is valid.
Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to standard Sudoku rules: each row, column, and 3x3 sub-box must contain the digits 1-9 without repetition.
Input: board = 9x9 grid where the first row contains 7 twice
Output: FALSE
Explanation: A val…
Dot Product of Two Sparse Vectors
Calculate the dot product of two sparse vectors.
Input: nums1 = [0,1,0,0,2], nums2 = [0,0,0,0,5]
Output: 10
Explanation: Multiplies the aligned non-zero values (2 * 5) and ignores all the zeros, yielding a dot product of 10.
Sort a String by Frequency
Sort a string by the frequency of its characters.
Input: s = "cccaaa"
Output: "cccaaa" or "aaaccc"
Explanation: Both 'c' and 'a' appear three times, so sorting them by descending frequency keeps them grouped equally.