End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
slowestKey to the first key in keysPressed and longestPress to releaseTimes[0].releaseTimes starting from the second element.currentDuration as the difference between the current and previous releaseTimes.currentDuration is greater than longestPress, update slowestKey and longestPress.currentDuration is equal to longestPress and the current key is lexicographically larger than slowestKey, update slowestKey.slowestKey after the iteration is complete.