Skip to content

masdeval/Algorithms-Princeton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a page dedicated to share my implementation of some algorithms

Coursera Algorithms I

Code I wrote to solve the quizzes when taking the course Algorithms I at Coursera.

Some code load input tests from text files. Please, be advised to change the location to resamble your configuration. The path in those files always point to /home/ubuntu/coursera

Find the code inside the src folder:

Coding Challenges

  • Stair Problem :
    • Definition: A child is running up a staircase with n steps and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count how many possible ways the child can run up the stairs.
    • There are three commented solutions in the code:
      • Using dynamic programming
      • Counting (my implementation)
      • An attempt to use matrix power linear algebra, which would lead to a O(1) solution. This attempt is partially wrong. I should have used the matrix of eigenvectors, but instead I factorized using SVD. Will fix soon.

In the folder others you can find other trick algorithms with discussion and explanation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published