Taboola Feed processes numeric configuration values and ordered delivery segments. Implement one function that performs two independent checks: determine whether an integer is an exact power of 3, and find the smallest value in a rotated sorted array.
The array was originally sorted in strictly increasing order and then rotated at an unknown pivot. For example, [5, 6, 1, 2, 3, 4] is a rotation of [1, 2, 3, 4, 5, 6].
Implement analyze_rotation(n, nums):
n can be written as 3^k for an integer k >= 0.nums.Return a dictionary with this exact structure: {"is_power_of_three": boolean, "minimum": integer}. The array contains distinct values and may be rotated zero positions. Do not sort the array, since the intended minimum search should use binary search.
def analyze_rotation(n, nums):