Skip to content

Small details in the implementation of Fibonnacci using Dynamic Programming. #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 56 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
56de592
Merge pull request #41 from TheAlgorithms/r0hit-gupta-patch-1
dynamitechetan Oct 27, 2017
f574d4e
Update README.md
r0hit-gupta Oct 27, 2017
b9d749a
Merge pull request #42 from TheAlgorithms/r0hit-gupta-patch-2
r0hit-gupta Oct 27, 2017
d937885
Add files via upload
Mar 9, 2018
5931e37
wrote prototype notation
Mar 30, 2018
10650f3
Merge pull request #45 from christianbender/changed_stack
Mar 30, 2018
fb08370
correspond to the target code of typescript
Mar 30, 2018
ef59b55
Merge pull request #46 from christianbender/changed_stack
Mar 30, 2018
5ec422e
more objectoriented
Mar 30, 2018
4d6735e
put in comments
Mar 30, 2018
aa2e942
Merge pull request #47 from christianbender/changed_queue
Mar 30, 2018
21c34de
Merge pull request #43 from christianbender/added_linear-algebra
Mar 30, 2018
bceb750
removed switch construct and put in a if-construct.
Mar 30, 2018
c8d0116
Merge pull request #48 from christianbender/changed_caesarsCipher
Mar 30, 2018
10e7696
wrote more object oriented
Mar 30, 2018
328cdbd
Merge pull request #49 from christianbender/changed_linklist
Mar 30, 2018
c4c5b77
wrote the tree more object oriented
Mar 30, 2018
17a6fab
Merge pull request #50 from christianbender/changed_Tree
Mar 30, 2018
f94d12f
added the let-statment to some methods
Mar 30, 2018
e136ecc
Merge pull request #51 from christianbender/added_let_tree
Mar 30, 2018
c977d81
fixed a leak and added the let-statement
Mar 30, 2018
3367dc1
fixed the function cocktailShakerSort and added the let-statment.
Mar 30, 2018
c83b680
fixed two leaks
Mar 30, 2018
1834928
added the let-statment and fixed a leak.
Mar 30, 2018
91c19d6
Merge pull request #54 from christianbender/fixed_bubblesort
Mar 30, 2018
f6c35bd
Merge pull request #53 from christianbender/fixed_cocktailShakerSort
Mar 30, 2018
370361a
Merge pull request #52 from christianbender/changed_bogoSort
Mar 30, 2018
1c835b4
added the let-statment
Mar 30, 2018
f39a999
Merge pull request #55 from christianbender/changed_gnomeSort
Mar 30, 2018
969902a
added let-statment
Mar 30, 2018
78860e0
Merge pull request #56 from christianbender/changed_heapSort
Mar 30, 2018
51b6420
added the let-statment
Mar 31, 2018
cd33f7c
Merge pull request #57 from christianbender/changed_euclian
Mar 31, 2018
8281dac
Create vigenereCipher.js
jonathangomz Sep 30, 2018
d3c315c
Merge pull request #58 from jonathangomz/patch-1
ms10398 Oct 4, 2018
c568927
minimum priority queue added under heap
thakursaurabh1998 Oct 4, 2018
7153799
Merge pull request #60 from thakursaurabh1998/heap-add-thakursaurabh
ms10398 Oct 4, 2018
81bd46c
feat: add counting sort
artolshansky Oct 13, 2018
7bd9840
feat: add flashsort
artolshansky Oct 13, 2018
63049b8
Merge pull request #61 from olshansky/feat/counting-sort
ms10398 Oct 14, 2018
b96bab7
Added Declaration for Local Variable
ParthS007 Oct 16, 2018
988572e
Merge pull request #63 from ParthS007/patch
ParthS007 Oct 16, 2018
9cd9b16
Implemented bucket sort algorithm
KuLi Oct 16, 2018
3afb902
Implemented comb sort algorithm
KuLi Oct 18, 2018
120947a
Merge pull request #65 from KuLi/combSort
ms10398 Oct 18, 2018
348919a
Added Missing declaration
ParthS007 Oct 19, 2018
2d50357
Merge pull request #66 from ParthS007/patch
ParthS007 Oct 19, 2018
7a81493
Implemented cycle sort algorithm
KuLi Oct 22, 2018
9f7639e
Merge pull request #74 from KuLi/cycleSort
ms10398 Oct 23, 2018
7b82729
Merge pull request #64 from KuLi/bucket_sort
ms10398 Oct 23, 2018
6331056
Create keyFinder
winsonrich Oct 25, 2018
5a75bca
Rename keyFinder to keyFinder.js
winsonrich Oct 27, 2018
e0fa99b
Update keyFinder.js
winsonrich Oct 27, 2018
e41ad76
Update keyFinder.js
winsonrich Oct 27, 2018
7a04d2a
Update keyFinder.js
winsonrich Oct 30, 2018
9cabd46
Merge pull request #78 from winsonrich/patch-4
ms10398 Oct 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wrote prototype notation
  • Loading branch information
Christian Bender committed Mar 30, 2018
commit 5931e372c60b96193d44084768b5cedff18f3117
16 changes: 8 additions & 8 deletions Data Structures/Stack/Stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,22 @@

// Functions: push, pop, peek, view, length

//Creates a stack
//Creates a stack constructor
var Stack = function () {
//The top of the Stack
this.top=0;
//The array representation of the stack
this.stack = {};
this.stack = new Array();
}

//Adds a value onto the end of the stack
this.push=function(value) {
Stack.prototype.push=function(value) {
this.stack[this.top]=value;
this.top++;
}

//Removes and returns the value at the end of the stack
this.pop = function(){
Stack.prototype.pop = function(){
if(this.top === 0){
return "Stack is Empty";
}
Expand All @@ -33,21 +34,20 @@ var Stack = function () {
}

//Returns the size of the stack
this.size = function(){
Stack.prototype.size = function(){
return this.top;
}

//Returns the value at the end of the stack
this.peek = function(){
Stack.prototype.peek = function(){
return this.stack[this.top-1];
}

//To see all the elements in the stack
this.view= function(){
Stack.prototype.view= function(){
for(var i=0;i<this.top;i++)
console.log(this.stack[i]);
}
}

//Implementation
var myStack = new Stack();
Expand Down