Skip to content

Commit

Permalink
3 YES
Browse files Browse the repository at this point in the history
  • Loading branch information
Andeo1812 committed Apr 6, 2022
1 parent 012255f commit 2c59c2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

2 - 4 - YES

3 - 2
3 - 2 YES

4 - 3

Expand Down
8 changes: 2 additions & 6 deletions module_1/3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ void Deque::PushBack(int data) {
Resize();
}

++last;

last = (last) % capacity;
last = (last + 1) % capacity;

array[last] = data;

Expand Down Expand Up @@ -138,9 +136,7 @@ int Deque::PopBack() {

array[last] = 0;

--last;

last = (last) % capacity;
last = (last - 1) % capacity;

return res;
}
Expand Down

0 comments on commit 2c59c2c

Please sign in to comment.