Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
03
:
13
:
48
Back to Dashboard
Candlestick Data Generator
Medium
A trading platform displays price data as candlestick charts. Each candlestick summarizes trading activity over a fixed time interval and contains five values: [startTime, max, min, open, close].
Given a list of [time, price] pairs (not necessarily sorted) and an interval width of 10, generate the candlestick data for all intervals from the earliest to the latest that contain data. Intervals are aligned to multiples of 10 (i.e., [0,10), [10,20), [20,30), etc.).
...