## Snippets tagged puzzle

• ### one to nine puzzle

Solve the one to nine puzzle with a utility function that handles the depth first search. First saw the puzzle here: http://msdn.microsoft.com/en-us/vcsharp/ee957404

0 people like this

Posted: 10 years ago by dave jones

• ### Sudoku with general solve function

Using the general solve function to solve Sudoku. The puzzle specific code was translated from Norvig's Sudoku code, but any errors are mine. Reuses code from fssnip.net/6m and fssnip.net/6n

0 people like this

Posted: 10 years ago by dave jones

• ### Longest Increasing Sub Seq

Find the longest consecutive sub-sequence of increasing numbers.

0 people like this

Posted: 10 years ago by Naveen

• ### Missionaries and Cannibals Problem and its state space tree

Generating a state space tree to the Missionaries and Cannibals Problem (http://en.wikipedia.org/wiki/Missionaries_and_cannibals_problem). Then, this tree is iterated with depth-first approach, printing all the visitations. The solutions to problem have a depth equals 9.

13 people like this

Posted: 8 years ago by Fabio Galuppo

• ### Eternity 2 Solver via Z3

Eternity 2 Solver via Z3.

2 people like this

Posted: 4 years ago by NIck Palladinos

• ### N-Queens

Code to solve the N-Queens problem.

4 people like this

Posted: 10 years ago by dave jones

• ### Minesweeper in 99 lines of code

This program is written in only 99 lines of actual code and remains enough readability. I used few short-coding technics. 1. no XAML. 2. pre-calculate every useful data for the purpose of eliminating useless states 3. using record type with set property as an alternative of view-model 4. initialize everything in one place. 5. encapsulate all states in one place.

16 people like this

Posted: 10 years ago by nagat01

• ### Phone number to words

Creates all possible mobile phone letter combinations from a number.

2 people like this

Posted: 9 years ago by Phillip Trelford

• ### Solving 8 queens problem with F#

Solve the 8 queens problem in F#, keeping available positions on the board as a list of X,Y coordinates.

2 people like this

Posted: 6 years ago by Tomas Petricek