Basic Algorithms For Leetcode 75