Traverse the array w [ ] & update positions jumps array a [ ]
for i in range ( n ) : NEW_LINE INDENT pos [ w [ i ] ] = i NEW_LINE filled [ i ] = True NEW_LINE jump [ w [ i ] ] = l [ i ] NEW_LINE a [ i ] = w [ i ] NEW_LINE DEDENT