improve the solution from O(N)->O(logN)
Merge branch 'master' of https://github.com/rekinyz/LeetCodeAlgorithmProblems.git