Skip to content

Commit 634b55a

Browse files
author
0x01f7
committed
style: comment
1 parent 15d8fb7 commit 634b55a

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

Diff for: algorithms/add_and_search_word_data_structure_design.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
# bool search(word)
77
#
88
# search(word) can search a literal word or a regular expression string
9-
# containing only letters a-z or .. A . means it can represent any one
10-
# letter.
9+
# containing only letters a-z or .. A . means it can represent any one letter.
1110
#
1211
# For example:
1312
#

Diff for: algorithms/add_binary.rb

+1-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
#
33
# Given two binary strings, return their sum (also a binary string).
44
#
5-
# For example,
6-
#
7-
# a = "11"
8-
# b = "1"
9-
# Return "100"
5+
# For example, a = "11", b = "1", Return "100".
106

117

128
# @param {String} a

Diff for: algorithms/add_digits.rb

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# https://leetcode.com/problems/add-digits/
22
#
3-
# Given a non-negative integer num, repeatedly add all its digits
4-
# until the result has only one digit.
3+
# Given a non-negative integer num, repeatedly add all its digits until the
4+
# result has only one digit.
55
#
66
# For example:
77
#
88
# Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2.
99
# Since 2 has only one digit, return it.
10+
#
11+
# Follow up:
12+
#
13+
# Could you do it without any loop/recursion in O(1) runtime?
14+
#
15+
# Credits:
16+
#
17+
# Special thanks to @jianchao.li.fighter for adding this problem and
18+
# creating all test cases.
1019

1120

1221
# @param {Integer} num

Diff for: algorithms/add_two_numbers.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# https://leetcode.com/problems/add-two-numbers/
22
#
3-
# You are given two linked lists representing two non-negative numbers.
4-
# The digits are stored in reverse order and each of their nodes contain
5-
# a single digit. Add the two numbers and return it as a linked list.
3+
# You are given two linked lists representing two non-negative numbers. The
4+
# digits are stored in reverse order and each of their nodes contain a single
5+
# digit. Add the two numbers and return it as a linked list.
66
#
77
# Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
88
# Output: 7 -> 0 -> 8

Diff for: algorithms/anagrams.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
# ["bat"]
1111
# ]
1212
#
13-
# Note:
13+
# Notes:
1414
#
15-
# + For the return value, each inner list's elements must follow
16-
# the lexicographic order.
15+
# + For the return value, each inner list's elements must follow the
16+
# lexicographic order.
1717
# + All inputs will be in lower-case.
1818

1919

0 commit comments

Comments
 (0)