Skip to content

Commit 6b5863c

Browse files
yanglbmeactions-user
authored andcommitted
style: prettify code
1 parent cf3d2c6 commit 6b5863c

File tree

3 files changed

+6
-6
lines changed
  • lcof
    • 面试题38. 字符串的排列
    • 面试题52. 两个链表的第一个公共节点
  • solution/1100-1199/1195.Fizz Buzz Multithreaded

3 files changed

+6
-6
lines changed

lcof/面试题38. 字符串的排列/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ var permutation = function (s) {
121121

122122
```cpp
123123
class Solution {
124-
public:
124+
public:
125125
void func(string str, int index, set<string>& mySet) {
126126
if (index == str.size()) {
127127
// 当轮训到最后一个字符的时候,直接放入set中。加入set结构,是为了避免插入的值重复
@@ -133,7 +133,7 @@ public:
133133
int temp = index + 1;
134134
func(str, temp, mySet);
135135
swap(str[i], str[index]);
136-
}
136+
}
137137
}
138138
}
139139

@@ -143,7 +143,7 @@ public:
143143
vector<string> ret;
144144
for (auto& x : mySet) {
145145
/* 这一题加入mySet是为了进行结果的去重。
146-
但由于在最后加入了将set转vector的过程,所以时间复杂度稍高 */
146+
但由于在最后加入了将set转vector的过程,所以时间复杂度稍高 */
147147
ret.push_back(x);
148148
}
149149
return ret;

lcof/面试题52. 两个链表的第一个公共节点/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ var getIntersectionNode = function (headA, headB) {
180180
* ListNode(int x) : val(x), next(NULL) {}
181181
* };
182182
*/
183-
183+
184184
class Solution {
185185
public:
186186
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {

solution/1100-1199/1195.Fizz Buzz Multithreaded/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ public:
9999
if (0 == index % 15 && index <= n) {
100100
printFizzBuzz();
101101
index++;
102-
}
102+
}
103103
}
104104
}
105105

106106
void number(function<void(int)> printNumber) {
107-
while (index <= n) {
107+
while (index <= n) {
108108
std::lock_guard<std::mutex> lk(mtx);
109109
if (0 != index % 3 && 0 != index % 5 && index <= n) {
110110
printNumber(index);

0 commit comments

Comments
 (0)