Power Of Three Leetcode Solution