Valid Sudoku

Medium 30 pts New · no attempts yet csharp

Valid Sudoku — Apple interview prep · Arrays & Hashing

Classic interview problem #36.

Input (stdin)

9 lines: board rows (space-separated cells)

Output (stdout)

true or false

Your program must read from stdin and write the answer to stdout (no extra debug text).

Examples

Sample
Input
5 3 . . 7 . . . .
6 . . 1 9 5 . . .
. 9 8 . . . . 6 .
8 . . . 6 . . . 3
4 . . 8 . 3 . . 1
7 . . . 2 . . . 6
. 6 . . . . 2 8 .
. . . 4 1 9 . . 5
. . . . 8 . . 7 9
Output
true
Static hints
  • Input format: 9 lines: board rows (space-separated cells)
  • DSA Interview 150 — Arrays & Hashing
  • Problem #36
  • Frequently asked at Apple
  • Arrays & Hashing

Toolliyo Coach

Stuck? Get a nudge — not the answer

Progressive help: Nudge → Guide → Approach. Full solution stays behind the Solution tab.

Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details