Skip to content

Instantly share code, notes, and snippets.

View amosgwa's full-sized avatar

Amos amosgwa

View GitHub Profile

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:

@amosgwa
amosgwa / BOGO.js
Created September 8, 2016 22:38 — forked from anonymous/BOGO.js
https://repl.it/DD97/19 created by amosgwa
//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(){
@amosgwa
amosgwa / BOGO.js
Created September 17, 2016 19:57 — forked from anonymous/BOGO.js
https://repl.it/DD97/41 created by amosgwa
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;
@amosgwa
amosgwa / N-Queens.hs
Last active November 9, 2017 00:08
Finding NQueens written in Haskell
-- 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