Uber is using a city ride network simulation, where intersections are represented as nodes in a graph,
…
Given an array of values, determine the required result under the following conditions.
Input: [4, 8, 15, 16, 23, 42]
Output: 3
Constraints: 1 ≤ n ≤ 10⁵
Unlock the full statement, examples, constraints, and solution guidance.
The answer array is [0, -1, 5, 8]
Run code to see test results
Uber • 1,746 views
Uber • 839 views
Uber • 915 views