summaryrefslogtreecommitdiff
path: root/src/main/webapp/Queue.js
diff options
context:
space:
mode:
authorAdhitya Kamakshidasan2016-11-04 12:58:57 +0530
committerGitHub2016-11-04 12:58:57 +0530
commit25afcccb46a603cc9d2485e25216acfffa2e3e02 (patch)
tree388d9d499a6fbf4496e4e906c1f028557e20a289 /src/main/webapp/Queue.js
parente56ebbef304e4837359065efe197e823404a33c9 (diff)
parent45e0da62e955b2350da8f2ccc1923475c06e1e2f (diff)
downloadxcos-on-web-25afcccb46a603cc9d2485e25216acfffa2e3e02.tar.gz
xcos-on-web-25afcccb46a603cc9d2485e25216acfffa2e3e02.tar.bz2
xcos-on-web-25afcccb46a603cc9d2485e25216acfffa2e3e02.zip
Merge pull request #186 from Hrily/master
Graph Plotting
Diffstat (limited to 'src/main/webapp/Queue.js')
-rwxr-xr-xsrc/main/webapp/Queue.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/webapp/Queue.js b/src/main/webapp/Queue.js
new file mode 100755
index 0000000..075a103
--- /dev/null
+++ b/src/main/webapp/Queue.js
@@ -0,0 +1,2 @@
+//code.stephenmorley.org
+function Queue(){var a=[],b=0;this.getLength=function(){return a.length-b};this.isEmpty=function(){return 0==a.length};this.enqueue=function(b){a.push(b)};this.dequeue=function(){if(0!=a.length){var c=a[b];2*++b>=a.length&&(a=a.slice(b),b=0);return c}};this.peek=function(){return 0<a.length?a[b]:void 0}}; \ No newline at end of file