Cross the Threshold

Asked at Snowflake · Coding & Leetcode-style Questions · Difficulty: Medium

There are n particles present in a space and an array, `initialEnergy[n]`. The `finalEnergy[i]` of the ith particle is `max(initialEnergy[i] - barrier, 0)`.

Loading the problem…