Skip to content

Commit ad5ad4a

Browse files
committed
remove trailing spaces
1 parent 745b394 commit ad5ad4a

7 files changed

+8
-8
lines changed

0009-palindrome-number.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Solution {
1212
bool isPalindrome(int x) {
1313
if (x < 0) return false;
1414
// Reverse digits
15-
long y = 0; // we have to use a long because some inputs
15+
long y = 0; // we have to use a long because some inputs
1616
int x2 = x; // exceed 2^31-1 when reversed
1717
while (x2 != 0) {
1818
y *= 10;

0020-valid-parentheses.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ class Solution {
2525
stack.pop_back();
2626
}
2727
}
28-
return stack.empty();
28+
return stack.empty();
2929
}
3030
};

0173-binary-search-tree-iterator.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ class BSTIterator {
3333
traverse(root);
3434
pos = arr.cbegin();
3535
}
36-
36+
3737
int next() {
3838
return *pos++;
3939
}
40-
40+
4141
bool hasNext() {
4242
return pos != arr.cend();
4343
}

0278-first-bad-version.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Memory: 7.58 MB (beats 62.02%)
1515
class Solution {
1616
public:
1717
int firstBadVersion(int n) {
18-
18+
1919
while (isBadVersion(n)) n--; // go back by one until last good ver
2020
return n + 1; // ver after last good ver is first bad one
2121
}

1845-seat-reservation-manager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SeatManager {
2424
seats.pop();
2525
return seatNumber;
2626
}
27-
27+
2828
void unreserve(int seatNumber) {
2929
// seat is now available
3030
seats.push(seatNumber);

2095-delete-the-middle-node-of-a-linked-list.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Solution {
2323
if (head->next == nullptr) {
2424
return nullptr;
2525
}
26-
ListNode *slower = head;
26+
ListNode *slower = head;
2727
ListNode *fast = head->next->next;
2828
while (fast != nullptr && fast->next != nullptr) {
2929
slower = slower->next;

2558-take-gifts-from-the-richest-pile.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Memory: 13.26 MB (beats 36.35%)
1010
class Solution {
1111
public:
1212
long long pickGifts(vector<int>& gifts, int k) {
13-
priority_queue<int> pq = { gifts.begin(), gifts.end() };
13+
priority_queue<int> pq = { gifts.begin(), gifts.end() };
1414
for (int i = 0; i < k; ++i) {
1515
int temp = pq.top();
1616
pq.pop();

0 commit comments

Comments
 (0)