This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Preetam D'Souza | |
# 4.24.09 | |
# Period 7 | |
###[ Constraint Solvers: Sudoku ]### | |
SIZE = 9 # 9x9 | |
# Check method cycles through each key in the dictionary, and makes | |
# sure that each value (neighbor) does not have the same value as the key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Preetam D'Souza | |
# 5.26.11 | |
# lcd.rb | |
# Usage: "ruby lcd.rb [-s SIZE] DIGITS" | |
# | |
# Input: Digits (0..9) and an optional size. | |
# Size defaults to 2. | |
# | |
# Output: Input digits in variable size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new-host-3:sudoku chaoticryld$ ruby sudoku_cp.rb | |
Running benchmarks... | |
0.698 secs to solve 50 easy puzzles (avg: 0.014 secs (71 Hz)) | |
3.498 secs to solve 95 hard puzzles (avg: 0.037 secs (27 Hz)) | |
0.176 secs to solve 11 hardest puzzles (avg: 0.016 secs (62 Hz)) | |
ORIGINAL PUZZLE: | |
4 . . |. . . |8 . 5 | |
. 3 . |. . . |. . . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Preetam D'Souza | |
* BOGOSORT | |
* 11.14.2011 | |
*/ | |
// HAPPY BIRTHDAY BOGO! | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> |