From f454a1010d00a0a2b106ef62d0d0369086ee3e58 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Mon, 12 Oct 2026 08:29:32 -0600 Subject: [PATCH 1/2] Fix early return in C++ deque demo The return statement was inside the final for loop, so only the first remaining item was printed. Move it after the loop, add a trailing newline, and fix the "Itm" typo. Co-Authored-By: Claude Opus 5.5 --- pretext/LinearBasic/ImplementingaDequeCpp.ptx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pretext/LinearBasic/ImplementingaDequeCpp.ptx b/pretext/LinearBasic/ImplementingaDequeCpp.ptx index 34e94042..e3f83319 100755 --- a/pretext/LinearBasic/ImplementingaDequeCpp.ptx +++ b/pretext/LinearBasic/ImplementingaDequeCpp.ptx @@ -47,7 +47,7 @@ int main() { d.pop_front(); cout << endl << "Item at the front: " << d.front() << endl; - cout << "Itm at the back: " << d.back() << endl; + cout << "Item at the back: " << d.back() << endl; cout << "Deque Size: " << d.size() << endl; cout << endl << "Items in the Deque: " << endl; @@ -55,9 +55,11 @@ int main() { for(int i = 0; i < dsize2; i++){ //prints each item in the deque. cout << d.at(i) << " "; + } + + cout << endl; return 0; - } } From fee67c42156ad7587de5f17f35894416b9910fa0 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Mon, 12 Oct 2026 08:40:22 -0600 Subject: [PATCH 2/2] Use "Deque" rather than "Dequeue" in exploration title "Dequeue" is the queue removal operation; the data structure is a deque. Co-Authored-By: Claude Opus 5.5 --- pretext/LinearBasic/ImplementingaDequeCpp.ptx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pretext/LinearBasic/ImplementingaDequeCpp.ptx b/pretext/LinearBasic/ImplementingaDequeCpp.ptx index e3f83319..7c2310fc 100755 --- a/pretext/LinearBasic/ImplementingaDequeCpp.ptx +++ b/pretext/LinearBasic/ImplementingaDequeCpp.ptx @@ -7,7 +7,7 @@ the front of the deque is at position 0 in the array.

- Dequeue Implementation + Deque Implementation C++ Implementation