LeetCode --- 1629. Slowest Key 解题报告

Posted 杨鑫newlfe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode --- 1629. Slowest Key 解题报告相关的知识,希望对你有一定的参考价值。

A newly designed keypad was tested, where a tester pressed a sequence of n keys, one at a time.

You are given a string keysPressed of length n, where keysPressed[i] was the ith key pressed in the testing sequence, and a sorted list releaseTimes, where releaseTimes[i] was the time the ith key was released. Both arrays are 0-indexed. The 0th key was pressed at the time 0, and every subsequent key was pressed at the exact time the previous key was released.

The tester wants to know the key of the keypress that had the longest duration. The ith keypress had a duration of releaseTimes[i] - releaseTimes[i - 1], and the 0th keypress had a duration of releaseTimes[0].

Note that the same key could have been pressed multipl

以上是关于LeetCode --- 1629. Slowest Key 解题报告的主要内容,如果未能解决你的问题,请参考以下文章

LeetCode --- 1629. Slowest Key 解题报告

LeetCode 1629 按键持续时间最长的按键[遍历] HERODING的LeetCode之路

leetcode 1月9日每日一题 1629. 按键持续时间最长的键

leetcode 1月9日每日一题 1629. 按键持续时间最长的键

Leetcode 1629. Slowest Key

1629. 按键持续时间最长的键