This is algorithm implementation code from Coursera algorithm course Stanford