In reply to rlraj_2020:
In reply to dave_59:
Agree. But the dude at the top was asking for an interview answer without using the delete() method. So KillSteal’s solution was good but I was just curious about his statement that says
The statement you quoted is what I disagree with. Queues are the most effecent kind of array for deleting a single element, regardless of whether they are in the middle or not.