algorithm code of problems on leetcode