Added task 2 method in Algorithms.
Merge remote-tracking branch 'origin/master'