Problemas
Which of the following data structures can erase from its beginning or its end in O(1) time? O(1) Pick ONE option vector deque stack segment tree
Solución
Miguelexperto · Tutor durante 3 años
Verificación de expertos
4.6 (234 votos)
Responder
deque<br /><br />Explanation: A deque (double-ended queue) is a data structure that allows insertion and deletion of elements from both ends in O(1) time. Therefore, it can erase elements from its beginning or end in O(1) time.
Haz clic para calificar: