2 added 68 characters in body
source | link

Julia, 2117 bytes

x->x|>(s=sortperm)|>s~=sortperm;!x=~~x

1-indexed. Grade up (sortperm) twice. Try it here.Try it here.

EDIT: Dennis saved four bytes by giving stuff operator-y names! Julia is weird.

Julia, 21 bytes

x->x|>(s=sortperm)|>s

1-indexed. Grade up (sortperm) twice. Try it here.

Julia, 17 bytes

~=sortperm;!x=~~x

1-indexed. Grade up (sortperm) twice. Try it here.

EDIT: Dennis saved four bytes by giving stuff operator-y names! Julia is weird.

1
source | link

Julia, 21 bytes

x->x|>(s=sortperm)|>s

1-indexed. Grade up (sortperm) twice. Try it here.