In the course it says delete operation on an array cost O(n), but in javascript all delete does is mark the indexed location to be undefined, and not array shifting is done. So isn’t that just O(1)?
In the course it says delete operation on an array cost O(n), but in javascript all delete does is mark the indexed location to be undefined, and not array shifting is done. So isn’t that just O(1)?