Skip to content

Instantly share code, notes, and snippets.

Avatar

AmosGwa amosgwa

View GitHub Profile
@amosgwa
amosgwa / N-Queens.hs
Last active Nov 9, 2017
Finding NQueens written in Haskell
View N-Queens.hs
-- Haskell NQueens
-- Name: Amos Gwa
-- Date: 22 November 2016
import Data.List
-- The position of the queens will be unique per row
-- because there will be no two queens in the same columns.
-- For example, this n = 4 with configuration of [1,2,3,4] is
-- Q X X X
-- X Q X X
View BOGO.js
function Node(data) {
this.data = data;
this.parent = null;
this._left = null;
this._right = null;
}
function biTree(data) {
var node = new Node(data);
this._root = node;
View BOGO.js
//Create Nodes class
function node(data,child){
this.data = data;
//Array of nodes
this.child = child;
this.visited = false;
}
//print the child
node.prototype.print = function(){
View keybase.md

Keybase proof

I hereby claim:

  • I am amosgwa on github.
  • I am agwa (https://keybase.io/agwa) on keybase.
  • I have a public key whose fingerprint is BCF8 3DB0 3B90 7112 5ED0 BB6D 243E 219C 932A C52D

To claim this, I am signing this object: