finish array related leetcode solutions