Data Structured58_q1_to_vector
Queue to Vector
9917cb2a-b4fd-46ef-beb3-9ab62d7069e4.cppC++
1// Loading code...Selected Submission
100 / 100
0.003s
1936 KB
DequeArray
Time Comp.
O(n) for the constructor, O(k) for to_vector
Space Comp.
O(n) where n is the capacity of the queue
Readability
6/10
"The code implements a circular queue using a dynamically allocated array (vector). The `at` function calculates the index in the circular buffer, and the constructor initializes the queue from iterators."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #8 | 100 | 10/20/2024 |
| Try #7 | 100 | 10/20/2024 |
| Try #6 | 50 | 10/20/2024 |
| Try #5 | 50 | 10/20/2024 |
| Try #4 | 50 | 10/20/2024 |
| Try #3 | 50 | 10/20/2024 |
| Try #2 | 0 | 10/20/2024 |
| Try #1 | 50 | 10/20/2024 |