Enter numbers above to validate
Loops through each row, column, and box to check for duplicates
Uses bit manipulation to track seen numbers - each bit represents a digit 1-9
Combines all checks into one operation and exits early on first error
Run benchmarks to compare algorithm performance
/api/validate
curl -X POST https://sudoku4john.com/api/validate \ -H "Content-Type: application/json" \ -d '{"grid": "534678912672195348198342567859761423426853791713924856961537284287419635345286179"}'
/api/batch
const response = await fetch('https://sudoku4john.com/api/batch', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ grids: [ '534678912672195348198342567859761423426853791713924856961537284287419635345286179', '123456789578139624496872153952381467641297835387564291719623548864915372235748916' ] })});const result = await response.json();console.log(`${result.successCount} valid, ${result.failureCount} invalid`);
/api/ocr
curl -X POST https://sudoku4john.com/api/ocr \ -F "image=@sudoku-puzzle.png"
Upload an image containing a sudoku puzzle