Skip to content

Instantly share code, notes, and snippets.

@pdsouza29
pdsouza29 / bogo.c
Created November 15, 2011 01:56
Bogosort
/* Preetam D'Souza
* BOGOSORT
* 11.14.2011
*/
// HAPPY BIRTHDAY BOGO!
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@pdsouza29
pdsouza29 / sample_output.txt
Created June 8, 2011 04:47
Ruby Sudoku Solver
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 . |. . . |. . .
@pdsouza29
pdsouza29 / lcd.rb
Created May 27, 2011 23:07
Ruby Quiz: LCD Numbers
# 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
@pdsouza29
pdsouza29 / sudoku.py
Created May 22, 2011 01:58
2009 Sudoku Solver
# 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