## 11071 - Permutation Representation

Moderator: Board moderators

Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany
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.

StatujaLeha
Learning poster
Posts: 91
Joined: Tue May 31, 2005 2:01 pm
Location: Russia
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.
mmm... I tried to use this implementation, but got RTE. After I changed heap for binary tree, I got Accepted.

spiker
New poster
Posts: 1
Joined: Sun Jul 04, 2010 11:12 am

### Re: 11071 - Permutation Representation

Can anyone explain the solution, which was post here?
I don't understand the main idea of this solution.
Can someone show the solution on the small input?