Wesley <nispray at gmail.com> wrote: > [Wesley] This is not homework:-) > And actually I am new to algorithm, so you guys can feel free to say anything you want In general, we cannot sort a sequence in O(n) time. O(n log n) is the lower bound on the complexity.