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

Conversation

duongtq
Copy link

@duongtq duongtq commented Jan 3, 2019

// My code just improves a little
// Feel free to ask me questions

function dp_ficbo(n)
{
var val = [];
for ( let i = 0; i <= n; i++)
{
val[i] = 0;
}
if ( n == 1 || n == 2)
{
return 1;
}
else
{
val[1] = 1;
val[2] = 2;

	for ( let i = 3; i <= n; i++ )
	{
		val[i] = val[i - 1] + val[i - 2];
	}
}

return val[n - 1];

}
console.log(dp_ficbo(20));

dynamitechetan and others added 30 commits October 27, 2017 14:58
correspond to the target code of typescript
removed switch construct and put in a if-construct.
wrote the tree more object oriented
added the let-statment to some methods
fixed the function cocktailShakerSort and added the let-statment.
fixed a leak and added the let-statement
Christian Bender and others added 26 commits March 31, 2018 00:02
I translate this code from Java repository to Javascript language. Could be improved.
feat: add counting and flash sorts
Fixes#62 : Added Declaration for Local Variable
Implemented comb sort algorithm
Added Missing declaration
Implemented cycle sort algorithm
Implemented bucket sort algorithm
Find and retrieve the encryption key automatically 
Note: This is a draft version, please help to modify, Thanks!
optimized the indentation for the if statement in line 18
some changes is made to optimize the function
Made 2 changes to optimize the match results:
1. use a loop to find the next digit of wordbank element and compare with outStr's digit
2. this part need to be optimize with the calculation of the number of occurance of word's probabilities
@ms10398
Copy link
Member

ms10398 commented Jan 3, 2019

Your fork is too old so it is showing old commits also can you rebase or update your fork please

@christianbender christianbender added the changes required This pull request needs changes label Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes required This pull request needs changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.