# Leetcode 869 - Reordered power of 2

Note:

• Typical DFS problem.
• Generate a table of power of 2 so we don’t need to calculate every time.
• Know how to prune branches by checking leading zeroes.
• Know how to avoid duplicates by using used[i].

Question:

You are given an integer n. We reorder the digits in any order (including the original order) such that the leading digit is not zero.

Return true if and only if we can do this so that the resulting number is a power of two.

Example:

Code:
Time complexity: O(log10(n)!)