Roblox SWE New Grad OA

职位: Roblox SWE New Grad



Roblox OA.pdf (916.0 KB)


Given an array of integers, representing points in a graph, find all points which are the ‘peak’ points in a graph.

Arr: [ 1, 4, 3, -1, 5, 5, 7, 4, 8 ]

Peaks: [4, 7, 8]

If you plot the numbers in the array as a graph, you’ll see it rising and falling based on the value. For a point to qualify as a ‘peak’, the graph should rise to the ‘peak’ and then fall.