Skip to content

Commit a8b703e

Browse files
authored
Create 0212_Problem_1.rb
1 parent 164206b commit a8b703e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: 0212_Problem_1.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# code_report Solution
2+
# Problem Link (Contest): https://leetcode.com/contest/weekly-contest-212/problems/slowest-key/
3+
# Problem Link (Practice): https://leetcode.com/problems/slowest-key/
4+
5+
def slowest_key(t, k)
6+
return t.unshift(0)
7+
.each_cons(2)
8+
.map{|a, b| b - a}
9+
.zip(k.chars)
10+
.max[1]
11+
end

0 commit comments

Comments
 (0)