my submitted code for programming practice on leetcode online judge