Skip to content

Commit 159ab1c

Browse files
committed
2023-08-29 v. 2.5.8: updated "942. DI String Match"
1 parent ef478eb commit 159ab1c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

leetcode-ruby.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require 'English'
55
::Gem::Specification.new do |s|
66
s.required_ruby_version = '>= 3.0'
77
s.name = 'leetcode-ruby'
8-
s.version = '2.5.2'
8+
s.version = '2.5.8'
99
s.license = 'MIT'
1010
s.files = ::Dir['lib/**/*.rb'] + %w[bin/leetcode-ruby README.md LICENSE]
1111
s.executable = 'leetcode-ruby'

lib/easy/942_di_string_match.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def di_string_match(s)
88
result = ::Array.new(n + 1)
99
l = 0
1010
h = n
11-
(0...n).step(1) do |i|
11+
(0...n).each do |i|
1212
if s[i] == 'I'
1313
result[i] = l
1414
l += 1

0 commit comments

Comments
 (0)