Goldman Sachs Interview Question

isPowerOfThree on leetcode was the easy question, I cannot remember the medium question.