Validate Completed Sudoku
Updated
Problem statement
You are given a completed 9 x 9 Sudoku board. Return true if the board is valid, meaning every row, every column, and every 3 x 3 sub-grid contains no duplicate digits and follows Sudoku rules. Otherwise return false.
Function
isCompletedSudokuValid(board: String[][]) → booleanExamples
Example 1
board = [["5","3","4","6","7","8","9","1","2"],["6","7","2","1","9","5","3","4","8"],["1","9","8","3","4","2","5","6","7"],["8","5","9","7","6","1","4","2","3"],["4","2","6","8","5","3","7","9","1"],["7","1","3","9","2","4","8","5","6"],["9","6","1","5","3","7","2","8","4"],["2","8","7","4","1","9","6","3","5"],["3","4","5","2","8","6","1","7","9"]]return = trueEvery row, column, and 3 x 3 sub-grid contains each digit exactly once.
More Apple Phone Screen questions
- Subarray Product Less Than KPHONE SCREEN · Seen Nov 2026
- Evaluate DivisionPHONE SCREEN · Seen Nov 2026
- Reverse a Linked ListPHONE SCREEN · Seen Nov 2026
- Validate a BST with a Custom ComparisonPHONE SCREEN · Seen Nov 2026
- Design a Food Rating SystemPHONE SCREEN · Seen Oct 2026
- Days Until Poisoned Plants StabilizePHONE SCREEN · Seen Oct 2026
- Capture Surrounded Regions with Union-FindPHONE SCREEN · Seen Oct 2026
- Maintain a Consistent-Hashing RingPHONE SCREEN · Seen Oct 2026
- Count Nodes in a ChainPHONE SCREEN · Seen Oct 2026
- Run-Length DecodingPHONE SCREEN · Seen Oct 2026
Similar questions at other companies
- Word Chain Jumps in a GridGoogle · PHONE SCREENGoogle interview questions
- Sparse Matrix Addition and MultiplicationPinterest · PHONE SCREENPinterest interview questions
- Rectangle Point Coverage CountsOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
- Sudoku Board ValidationConfluent · PHONE SCREEN · ONSITE INTERVIEWConfluent interview questions
- Sparse Matrix MultiplicationByteDance · PHONE SCREENByteDance interview questions
- Valid SudokuVerkada · PHONE SCREENVerkada interview questions
- Configurable Tic-Tac-Toe GameEliseAI · PHONE SCREEN
- Sparse Matrix Multiplication in COO FormMeta · PHONE SCREENMeta interview questions
- Layered Rectangle CanvasRippling · PHONE SCREEN · ONSITE INTERVIEWRippling interview questions
- Number of Distinct IslandsBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
Apple interview experiences
- Apple SWE Phone Screen: Subarray Products: 1 Experience
- Apple New Grad SWE Java, Coding and Manager Rounds: 1 Experience
- Apple AI Coding and Related Interviews: 17 Experiences
- Apple India SWE New Grad Interviews: 5 Experiences
- Apple New Grad SWE Phone Screens: 12 Experiences (Part 3 of 3)
- Apple New Grad SWE and Embedded: 16 Experiences (Part 2 of 3)