Skip to content

Instantly share code, notes, and snippets.

Rupesh Singh RUPOJS

Block or report user

Report or block RUPOJS

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@RUPOJS
RUPOJS / hanoi.js
Last active Aug 29, 2015
Tower of Hanoi implementation in JavaScript using recursion
View hanoi.js
var write = function(string) {
document.write(string);
}
var i = 0;
var hanoi = function(disc,src,aux,dst) {
if (disc > 0) {
hanoi(disc - 1,src,dst,aux);
write("Move disc " + disc + " from " + src + " to " + dst + "<br />");
@RUPOJS
RUPOJS / queue.js
Last active Aug 29, 2015
Simple implementation of queue data structure using linked list(kind of) in javascript
View queue.js
function Node(data) {
this.data = data;
this.next = null;
};
function Queue() {
this.head = null;
this.tail = null;
};
You can’t perform that action at this time.