Skip to content

Commit 30330b6

Browse files
author
=
committed
valid and deque tests closes #20
1 parent f42868d commit 30330b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: Deque.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ class my_deque {
161161
// -----
162162

163163
bool valid () const {
164-
// <your code>
164+
if( _size >_top_size*AWIDTH || _size < 0 ){
165+
return false;}
165166
return true;}
166-
pointer get_last(){
167-
return _e[((_size)-(AWIDTH-_offset))%AWIDTH];}
168-
public:
167+
168+
public:
169169
// --------
170170
// iterator
171171
// --------

0 commit comments

Comments
 (0)