Skip to content

Commit 21c5537

Browse files
committed
2023-08-29 v. 2.5.1: updated "832. Flipping an Image"
1 parent f3e2172 commit 21c5537

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

lib/easy/832_flipping_an_image.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def flip_and_invert_image(image)
77
c = image[0].length
88
image.each do |row|
9-
(0...(c + 1) / 2).step(1) do |i|
9+
(0...(c + 1) / 2).each do |i|
1010
temp = row[i] ^ 1
1111
index = c - i - 1
1212
row[i] = row[index] ^ 1

0 commit comments

Comments
 (0)