All Questions
6 questions
2
votes
1
answer
78
views
Queue Interview Code basic methods made from struct Node optimized
Using feedback from my previous implementation I'm writing a very simple Queue of struct Nodes with only these methods get_front(), get_back(), pop_front(), push_back(), and a ostream friend method. I ...
2
votes
3
answers
160
views
Queue Interview Code basic methods made from struct Node
Thanks for all the feedback, I optimized the code here.
Here I'm Writing a very simple Queue of struct Nodes with only these methods get_front(), ...
1
vote
1
answer
3k
views
Queue implementation using unique_ptr
I am trying out different data structures to learn more about smart pointers. I have created a queue implementation which has push, ...
1
vote
1
answer
5k
views
Smart Pointers Queue Implementation
To practice around with C++11 smart pointers I was trying to implement a simple Queue to go beyond a simple Linked List. The fact that the _first and ...
4
votes
1
answer
945
views
Template double ended queue (deque) implementation using dynamic allocation C++
I have written my own deque class to get a better grasp of C++ pointers and memory management. The following code is part of a larger 2D isometric game I am developing. It compiles and runs fine using ...
12
votes
3
answers
17k
views
Tail implementation in C
Write the program tail, which prints the last n lines of its input. By default, n is 10, let ...