3 deleted 9 characters in body

R, 585555 45 bytes

b=seq(a<-scana=scan());while(any(b-a)a>2)a=matrix(a,,2,F<-F+1);F


Simulates the sorting process. Input is 1-indexed, returns FALSE for 0.

R, 5855 bytes

b=seq(a<-scan());while(any(b-a))a=matrix(a,,2,F<-F+1);F


Try it online!

Simulates the sorting process. Input is 1-indexed, returns FALSE for 0.

R, 5855 45 bytes

a=scan();while(a>2)a=matrix(a,,2,F<-F+1);F


Try it online!

Simulates the sorting process. Input is 1-indexed, returns FALSE for 0.

2 deleted 1 character in body

R, 5858 55 bytes

b=seq(a<-scan());while(any(b-a))a=matrix(a,,2,F<-F+1)[b];F;F


Simulates the sorting process. Input is 1-indexed, returns FALSE for 0.

R, 58 bytes

b=seq(a<-scan());while(any(b-a))a=matrix(a,,2,F<-F+1)[b];F


Try it online!

Simulates the sorting process. Input is 1-indexed, returns FALSE for 0.

R, 58 55 bytes

b=seq(a<-scan());while(any(b-a))a=matrix(a,,2,F<-F+1);F


Try it online!

Simulates the sorting process. Input is 1-indexed, returns FALSE for 0.

1

R, 58 bytes

b=seq(a<-scan());while(any(b-a))a=matrix(a,,2,F<-F+1)[b];F


Try it online!

Simulates the sorting process. Input is 1-indexed, returns FALSE for 0.