what is the time complexity of implementing dequeue() of queue using array? Assuming that we are not using two pointers to indicate which is front and which back. i.e we are not using a circular queue.
In the worst case assume that queue is having 10 elements, then if we remove first element then we have to move all the remaining 9 elements forward by one index. so worst case complexity is O(n).
Back To Top