Find all permuations of given array Value[] in Lexicographic order.

[Dijkstra, p. 71].

**Answer:**```
```

void getNext()

{

int i = N - 1;

while (Value[i-1] > = Value[i])

i = i-1;

int j = N;

while (Value[j-1] < = Value[i-1])

j = j-1;

swap(i-1, j-1);

i++;

j = N;

while (i < j)

{

swap(i-1, j-1);

i++;

j--;

}

}

[Dijkstra, p. 71].