Tic-Tac-Toe (Java)

Design a Tic-tac-toe game that is played between two players on a n x n grid. Java Solution 1 - Naive We can simply check the row, column, and diagonals…

Continue Reading

Sudoku Solver (Java)

Write a program to solve a Sudoku puzzle by filling the empty cells. Java Solution public void solveSudoku(char[][] board) { helper(board); } private boolean helper(char[][] board){ for(int i=0; i<9; i++){…

Continue Reading