Wrapper Promotion — Solution & Editorial
Buy M/C bars, then repeatedly trade wrappers: identical structure to the candle-stub problem.
Complexity: O(1) or O(log)
Buy M/C bars, then repeatedly trade wrappers: identical structure to the candle-stub problem.
Complexity: O(1) or O(log)