This question evaluates a candidate's ability to design efficient array-based algorithms, reason about subarray sums, algorithmic complexity, and appropriate data-structure choices within the Coding & Algorithms domain.

Given an integer array nums and an integer k, find all subarrays whose length is a power of two and whose sum lies in the inclusive range [k, 2k]. Return the list of index ranges. Provide an algorithm faster than O(n^ 2). For non-negative nums, use sliding windows across candidate lengths (1, 2, 4, ...). For arrays with negative values, propose a prefix-sum plus balanced tree or hash-bucketing strategy and analyze complexity.