output the integers in sorted order using constant storage

Given a stream of N integers which has the property that no integer is more than 1000 positions away from its sorted location, how would you output the integers in sorted order while using constant storage?

Comments

Popular posts from this blog

Circular game survival