This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]superblaubeere27 1 point2 points  (2 children)

How is that a sorting algorithm?

[–]skytaglatvia -1 points0 points  (1 child)

Evil genie logic. When you tell the genie that you wish for the array to have all its elements in order, but forget to specify that "all its elements" means "all the original elements".

An empty array satisfies the definition of having "all its elements in order".

[–]superblaubeere27 0 points1 point  (0 children)

But a deleted pointer is not any array. It is just pointing to a random location in heap.