Object-Oriented Programming · Goldman Sachs · Easy
Requirements Create a double-ended queue for strings without relying on a built-in deque or the collections package. Provide these operations: Each operation must run in O(1) time. Notes Account for empty-deque peeks and removals, maintain the element count accurately, and keep the front and back references valid when the deque contains either zero or one item. In CoderPad, use spaces consistently for indentation. Mixing tabs and spaces can cause Python 3 to raise TabError:…
Checking your access…