Skip to content

Commit 7507dbc

Browse files
committed
2023-08-29 v. 2.5.2: updated "868. Binary Gap"
1 parent f3e2172 commit 7507dbc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

leetcode-ruby.gemspec

Lines changed: 1 addition & 1 deletion
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.0'
8+
s.version = '2.5.2'
99
s.license = 'MIT'
1010
s.files = ::Dir['lib/**/*.rb'] + %w[bin/leetcode-ruby README.md LICENSE]
1111
s.executable = 'leetcode-ruby'

lib/easy/868_binary_gap.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def binary_gap(n)
88
distance = 0
99
count = 0
1010
is_counting = false
11-
(0...binary.length).step(1) do |i|
11+
(0...binary.length).each do |i|
1212
if binary[i] == '1'
1313
if is_counting
1414
count += 1

0 commit comments

Comments
 (0)