Interview Round DistributionClick any round below to filter
Topics:
Showing 20 of 99 results for Magic LeapPage 1 of 5
Coding
45
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…
Minimum Path Sum
Find the minimum path sum from top-left to bottom-right in a grid.
Input: grid = [[1,2,3],[4,5,6]]
Output: 12
Explanation: The optimal path moves along 1 -> 2 -> 3 -> 6, resulting in a minimum accumulated sum of 12.
Palindromes in Base-10 and Base-k
Return the first n integers that are palindromes in both base-10 and base-k.
Input: n = 2, k = 4
Output: [1, 5]
Explanation: 1 is '1' in base 4, and 5 is '11' in base 4. Both are perfect palindromes in decimal and base 4 simultaneously.
Find the majority element in an array.
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊n / 2⌋ times. You may assume that the majority element always exists in the array.
Input: nums = [3, 2, 3]
Output: 3
Explanation: The number 3 appears 2 times, which is strictly greate…