File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
solution/1100-1199/1195.Fizz Buzz Multithreaded Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ var permutation = function (s) {
121121
122122``` cpp
123123class 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;
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ var getIntersectionNode = function (headA, headB) {
180180 * ListNode(int x) : val(x), next(NULL) {}
181181 * };
182182 */
183-
183+
184184class Solution {
185185public:
186186 ListNode * getIntersectionNode(ListNode * headA, ListNode * headB) {
Original file line number Diff line number Diff 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);
You can’t perform that action at this time.
0 commit comments