Small Space Solution

sort by