Leetcode 326. Power of Three

Input: n = 27
Output: true
Input: n = 0
Output: false
Input: n = 9
Output: true
Input: n = 45
Output: false

CS new grad, 6 years experience related to supply chain management. Located in Bay area