Skip to content

Commit 22acf03

Browse files
committed
Add new line for all Ruby Solutions from 001 to 020
1 parent 79691c8 commit 22acf03

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

solution/001.Two Sum/Solution.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ def two_sum(nums, target)
88
end
99
next
1010
end
11-
end
11+
end

solution/002.Add Two Numbers/Solution.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ def add_two_numbers(l1, l2)
3434
end
3535

3636
l3
37-
end
37+
end

solution/007.Reverse Integer/Solution.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ def reverse(x)
1818
# have to explicitly constraint the int boundary as per the dummy test case
1919
res = s.to_i
2020
res <= 214_748_364_7 && res >= -214_748_364_8 ? res : 0
21-
end
21+
end

solution/013.Roman to Integer/Solution.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ def roman_to_int(s)
2929
end
3030

3131
res
32-
end
32+
end

solution/014.Longest Common Prefix/Solution.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ def longest_common_prefix(strs)
2222
end
2323

2424
idx > 0 ? strs[0][0..idx] : ''
25-
end
25+
end

solution/015.3Sum/Solution.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ def three_sum(nums)
2525
end
2626

2727
res
28-
end
28+
end

solution/019.Remove Nth Node From End of List/Solution.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ def remove_nth_from_end(head, n)
2424
return head.next if count == n
2525
s.next = s.next.next
2626
head
27-
end
27+
end

solution/020.Valid Parentheses/Solution.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ def is_valid(s)
1919
end
2020
end
2121
stack == ''
22-
end
22+
end

0 commit comments

Comments
 (0)