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…
Experience: 2 YOE + 6 Months of internship with the same team.
Round 1: DSA(1 hour)
- Asked 2 DSA problems.
- Asked few questions before starting to think of code then explained brute force approch followed by optimized.
These are the questions asked:
- Given an array heights where each elemetnts represents the height of a vertical line…
Recently, I interviewed with eBay for a Software Engineer role. The first round was a coding round on CodeSignal consisting of two questions.
## **Question 1: Find the K Smallest Elements from Multiple Sorted Arrays**
Similar LeetCode: https://leetcode.com/problems/merge-k-sorted-lists/
My initial solution was to insert all elements in…
Rotate a linked list to the right by k places.
Given the head of a linked list, rotate the list to the right by k places.
Input: head = [0,1,2], k = 4
Output: [2,0,1]
Explanation: The list has a length of 3. Rotating by 4 is mathematically equivalent to rotating by 1 (4 mod 3 = 1).