Skip to content

nmicht/algorithm-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm Exercises

Repository to save all the algorithms that I solved to practice algorithms, but also all the others that I was not able to complete during my time window for this.

Algorithm Lessons learned

Language lessons learned

  • JavaScript sort is made for strings, for numbers is required to do a subtraction
  • Python: avoid pop and try to access directly to the element, that improves performance a lot
  • Python: for-in does not include "end"
  • Python: can use lambdas to order by object key myList.sort(key=lambda obj: obj.prop, reverse=False)
  • Python: for range if the step is not one by one, you have to add it as a third parameter range(5, 1, -1)