Moderator: Board moderators
mmm... I tried to use this implementation, but got RTE. After I changed heap for binary tree, I got Accepted.Adrian Kuegel wrote:When I said heap I only meant using the idea that a node with index i has one child at index 2 * i, and the other at 2 * i + 1.
So a binary tree can be represented in an integer array without the need of using left or right pointers.
Users browsing this forum: No registered users and 1 guest