Skip to content

Commit 68934f1

Browse files
author
0x01f7
committed
style: comment
1 parent 20486c5 commit 68934f1

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

algorithms/game_of_life.rb

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
# principle, the board is infinite, which would cause problems when
3131
# the active area encroaches the border of the array. How would you
3232
# address these problems?
33+
#
34+
# Credits:
35+
#
36+
# Special thanks to @jianchao.li.fighter for adding this problem and
37+
# creating all test cases.
3338

3439

3540
# @param {Integer[][]} board

algorithms/gas_station.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# https://leetcode.com/problems/gas-station/
22
#
3-
# There are N gas stations along a circular route, where the amount of gas
4-
# at station i is gas[i]. You have a car with an unlimited gas tank and it
5-
# costs cost[i] of gas to travel from station i to its next station (i+1).
6-
# You begin the journey with an empty tank at one of the gas stations.
3+
# There are N gas stations along a circular route, where the amount of gas at
4+
# station i is gas[i]. You have a car with an unlimited gas tank and it costs
5+
# cost[i] of gas to travel from station i to its next station (i+1). You begin
6+
# the journey with an empty tank at one of the gas stations.
77
#
8-
# Return the starting gas station's index if you can travel around the
9-
# circuit once, otherwise return -1.
8+
# Return the starting gas station's index if you can travel around the circuit
9+
# once, otherwise return -1.
1010
#
1111
# Note: The solution is guaranteed to be unique.
1212

algorithms/generate_parentheses.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# https://leetcode.com/problems/generate-parentheses/
22
#
3-
# Given n pairs of parentheses, write a function to generate all
4-
# combinations of well-formed parentheses.
3+
# Given n pairs of parentheses, write a function to generate all combinations
4+
# of well-formed parentheses.
55
#
66
# For example, given n = 3, a solution set is:
77
#

algorithms/gray_code.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# https://leetcode.com/problems/gray-code/
22
#
3-
# The gray code is a binary numeral system where two successive values
4-
# differ in only one bit. Given a non-negative integer n representing
5-
# the total number of bits in the code, print the sequence of gray
6-
# code. A gray code sequence must begin with 0.
3+
# The gray code is a binary numeral system where two successive values differ
4+
# in only one bit. Given a non-negative integer n representing the total
5+
# number of bits in the code, print the sequence of gray code. A gray code
6+
# sequence must begin with 0.
77
#
88
# For example, given n = 2, return [0,1,3,2]. Its gray code sequence is:
99
#
@@ -15,10 +15,10 @@
1515
# Note:
1616
#
1717
# + For a given n, a gray code sequence is not uniquely defined.
18-
# + For example, [0,2,3,1] is also a valid gray code sequence
19-
# according to the above definition.
20-
# + For now, the judge is able to judge based on one instance of
21-
# gray code sequence. Sorry about that.
18+
# + For example, [0,2,3,1] is also a valid gray code sequence according to
19+
# the above definition.
20+
# + For now, the judge is able to judge based on one instance of gray code
21+
# sequence. Sorry about that.
2222

2323

2424
# @param {Integer} n

0 commit comments

Comments
 (0)