Rearrange spaces based on use in OS X Mission Control
Change spaces based on last use in Mission Control on your Mac
Here's how you can make Mission Control in OS X rearrange spaces based on your last use.
1. Open System Preferences.
2. Go to Mission Control.
3. Click the checkbox next to "Automatically rearrange spaces based on most recent use."
For more, see the original article at the link below.