This repository contains Java codes for the solution and visualization of various puzzles
Generates a magic square of order n. A magic squares is an n-by-n
matrix of the integers 1 to n^2, such that all row, column, and
diagonal sums are equal.[NB: n must be odd]
There are n people standing in a circle waiting to be executed.The counting out begins at some point
in the circle and proceeds around the circle in a fixed direction. In each step, a certain number of
people are skipped and the next person is executed. The elimination proceeds around the circle
(which is becoming smaller and smaller as the executed people are removed), until only the last person
remains, who is given freedom. Given the total number of persons n and a number k which indicates that
k-1 persons are skipped and kth person is killed in circle. The task is to choose the place in the initial
circle so that you are the last one remaining and so survive.
Generates Maze, then creates solution and visualization
How many ways are there to place N rooks on an N-by-N board so that
no rook can attack any other and show visualization
How many ways are there to place N queens on an N-by-N board so that
no queen can attack any other and show visualization
Solution and visualization of the 8 and 15 slider puzzle(Test cases are included)
Solution and visualization of the 9x9 Sudoku (Test file is included.
Just change the test file with the 9x9 board you want to solve)
TicTacToe game simple Code implemented using Javafx
Simple Code implementing the steps for Tower_Of_Hanoi to transfer the disks