This repository contains solutions to several algorithmic problems in Java. Each problem is implemented as a separate file in the src folder.
File: SudokuValidator.java
What it does: Validates a 9x9 Sudoku board, checking rows, columns, and custom zones for unique digits 1–9.
How to run:
javac SudokuValidator.java
java SudokuValidatorFile: AlienDictionary.java
What it does: Determines the character order of an alien language from a sorted word list.
How to run:
javac AlienDictionary.java
java AlienDictionaryFile: KnightsAndPortals.java
What it does: Finds the shortest path from top-left to bottom-right in a grid, allowing one teleport between empty cells.
How to run:
javac KnightsAndPortals.java
java KnightsAndPortalsFile: BitwiseMatchingPattern.java
What it does: Finds the next larger integer with the same number of binary 1s as the input.
How to run:
javac BitwiseMatchingPattern.java
java BitwiseMatchingPatternFile: MatrixIslandsWithDiagonals.java
What it does: Counts the number of islands (connected 1s) in a matrix, considering diagonal connections.
How to run:
javac MatrixIslandsWithDiagonals.java
java MatrixIslandsWithDiagonalsFile: MiniInterpreter.java
What it does: Evaluates simple let variable declarations and if conditions from input strings, supporting variable assignment, conditional logic, and printing variable values.
How to run:
javac MiniInterpreter.java
java MiniInterpreterNote:
Navigate to the src folder before compiling and running, or use the full path from the project root.
<<<<<<< HEAD
The
.classfiles are generated automatically when you compile the.javafiles and are required to run the programs. ======= The.classfiles are generated automatically when you compile the.javafiles and are required to run the programs.c6781302860798b057ad6eff47893d3bf61ad518