Sort one sequence by O(n) in time and O(1) in space
Wesley
nispray at gmail.com
Sun Feb 9 07:13:50 EST 2014
More information about the Python-list mailing list
Sun Feb 9 07:13:50 EST 2014
- Previous message (by thread): imperative mood in docstrings
- Next message (by thread): Sort one sequence by O(n) in time and O(1) in space
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi guys, Here is one question related to algorithm. Details here: here is input sequence like a1,a2,...,an,b1,b2,...,bn ,the ax and bx always exist in pair. So, now, how to change the sequence to a1,b1,...,an,bn, with time complexity as O(n) and space as O(1). Any comments will be appreciated. Thanks. Wesley
- Previous message (by thread): imperative mood in docstrings
- Next message (by thread): Sort one sequence by O(n) in time and O(1) in space
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list