Leetcode Question 104 Solution In C