</>OfferRetriever
DashboardDiscuss
NEW

July 4th Sale

Limited Time Deal: Unlock all premium questions for over 40% off

$10.42$6.25

10

:

09

:

30

:

34

Get this deal
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.). ...