Skip to content

Commit 4cda310

Browse files
committed
adjust the comment length
1 parent ad62b9d commit 4cda310

File tree

73 files changed

+220
-120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+220
-120
lines changed

src/3Sum/3Sum.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
/**********************************************************************************
66
*
7-
* Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
7+
* Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0?
8+
* Find all unique triplets in the array which gives the sum of zero.
89
*
910
* Note:
1011
*

src/3SumClosest/3SumClosest.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
/**********************************************************************************
66
*
7-
* Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution.
7+
* Given an array S of n integers, find three integers in S such that the sum is
8+
* closest to a given number, target. Return the sum of the three integers.
9+
* You may assume that each input would have exactly one solution.
810
*
911
* For example, given array S = {-1 2 1 -4}, and target = 1.
1012
*

src/4Sum/4Sum.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
/**********************************************************************************
66
*
7-
* Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.
7+
* Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target?
8+
* Find all unique quadruplets in the array which gives the sum of target.
89
*
910
* Note:
1011
*

src/LRUCache/LRUCache.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44

55
/**********************************************************************************
66
*
7-
* Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
8-
*
9-
* get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.
10-
* set(key, value) - Set or insert the value if the key is not already present. When the cache reached its capacity, it should invalidate the least recently used item before inserting a new item.
7+
* Design and implement a data structure for Least Recently Used (LRU) cache.
8+
* It should support the following operations: get and set.
119
*
10+
* get(key) - Get the value (will always be positive) of the key if the key exists
11+
* in the cache, otherwise return -1.
12+
*
13+
* set(key, value) - Set or insert the value if the key is not already present.
14+
* When the cache reached its capacity, it should invalidate
15+
* the least recently used item before inserting a new item.
1216
*
1317
**********************************************************************************/
1418

src/addTwoNumbers/addTwoNumbers.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
/**********************************************************************************
66
*
7-
* You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
7+
* You are given two linked lists representing two non-negative numbers.
8+
* The digits are stored in reverse order and each of their nodes contain a single digit.
9+
* Add the two numbers and return it as a linked list.
810
*
911
* Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
1012
* Output: 7 -> 0 -> 8

src/balancedBinaryTree/balancedBinaryTree.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
*
77
* Given a binary tree, determine if it is height-balanced.
88
*
9-
* For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
9+
* For this problem, a height-balanced binary tree is defined as a binary tree in which
10+
* the depth of the two subtrees of every node never differ by more than 1.
1011
*
1112
*
1213
**********************************************************************************/

src/bestTimeToBuyAndSellStock/bestTimeToBuyAndSellStock.II.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
*
77
* Say you have an array for which the ith element is the price of a given stock on day i.
88
*
9-
* Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times). However, you may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).
9+
* Design an algorithm to find the maximum profit. You may complete as many transactions
10+
* as you like (ie, buy one and sell one share of the stock multiple times). However,
11+
* you may not engage in multiple transactions at the same time (ie, you must sell the
12+
* stock before you buy again).
1013
*
1114
**********************************************************************************/
1215

src/bestTimeToBuyAndSellStock/bestTimeToBuyAndSellStock.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
*
77
* Say you have an array for which the ith element is the price of a given stock on day i.
88
*
9-
* If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.
9+
* If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock),
10+
* design an algorithm to find the maximum profit.
1011
*
1112
**********************************************************************************/
1213

src/binaryTreeInorderTraversal/binaryTreeInorderTraversal.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
*
2424
* OJ's Binary Tree Serialization:
2525
*
26-
* The serialization of a binary tree follows a level order traversal, where '#' signifies a path terminator where no node exists below.
26+
* The serialization of a binary tree follows a level order traversal, where '#' signifies
27+
* a path terminator where no node exists below.
2728
*
2829
* Here's an example:
2930
*

src/binaryTreeLevelOrderTraversal/binaryTreeLevelOrderTraversal.II.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
/**********************************************************************************
66
*
7-
* Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
7+
* Given a binary tree, return the bottom-up level order traversal of its nodes' values.
8+
* (ie, from left to right, level by level from leaf to root).
89
*
910
* For example:
1011
* Given binary tree {3,9,20,#,#,15,7},
@@ -27,7 +28,8 @@
2728
*
2829
* OJ's Binary Tree Serialization:
2930
*
30-
* The serialization of a binary tree follows a level order traversal, where '#' signifies a path terminator where no node exists below.
31+
* The serialization of a binary tree follows a level order traversal, where '#' signifies
32+
* a path terminator where no node exists below.
3133
*
3234
* Here's an example:
3335
*

0 commit comments

Comments
 (0)