Skip to content

Instantly share code, notes, and snippets.

@ayyytam
ayyytam / gist:4f5d954b7ae03a3c0ee2
Created September 11, 2014 03:15
Sudoku-Solver
/*Sudoku Solver
This Sudoku solver gives solution to a Sudoku given a Sudoku problem in Row Major Form*
I am going to first try solving this using Depth First Search.
TODO I also want to try solving it like a human would using constraints.
The assumption is that a Soduku is a 9 x 9 solution
Solution inspired by JOHANNES BRODWALL
Written by Andrew Tam
Input Form:
@ayyytam
ayyytam / TwentyFourtyEight
Last active August 4, 2022 18:02
2048 terminal game
// Terminal 2048
// By: Andrew Tam
// There is currently no GUI for this game and is played completely on the Terminal.
// Type in the instructions such as "up", "down", "left", "right" to move the tiles
// Type in "reset" to reset the game
import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Random;