LeetCode final solutions