Skip to content

algorithms I have implemented with python for fun. check them out for reference or add more algorithms

License

Notifications You must be signed in to change notification settings

mez/algorithms_with_python

Repository files navigation

algorithms_with_python

NOTE: These algorithms I have implemented with python for fun are inspired by the stanford algo class on coursera https://class.coursera.org/algo-005 (Algorithms: Design and Analysis, Part 1 by: Tim Roughgarden). They were often used to solve programming assignments. check them out for reference or add more algorithms.

NOTE: If you are a current student of this course, please make sure to attempt the problems yourself first. Best part of learning is coming up with the solution yourself!

Algorithms in this pack

  1. merge sort
  2. O(nlogn) inversion counter
  • this algorithm performs with O(nlogn) by peggybacking on merge sort!
  1. Finding second largest number in an array with at most n + logn - 2 comparisons!
  • for this algo tourny algo is the main inspiration. Another divide and conquer algo.
  1. Finding max element in unimodal array in logn
  • inspired by bisection method if you think max element as f(x)=0 aka root point.
  1. Find if a[i] = i, in a sorted, distinct (increasing order) n elements array

About

algorithms I have implemented with python for fun. check them out for reference or add more algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages