help how to sort a list in order of 'n' in python without using inbuilt functions??

Roy Smith roy at panix.com
Sat May 25 10:03:24 EDT 2013


In article <74e33270-a79a-4878-a400-8a6cda6637b2 at googlegroups.com>,
 lokeshkoppaka at gmail.com wrote:

> ya steven i had done the similar logic but thats not satisfying my professor 
> he had given the following constrains
>  1. No in-built functions should be used
>  2. we are expecting a O(n) solution
>  3. Don't use count method

A couple of points here:

1) In general, people on mailing lists are not into doing homework 
problems for other people.

2) If you're going to bring us a homework problem, at least describe the 
whole problem up front.  It really doesn't help to dribble out new 
requirements one at a time.

3) rustompmody at gmail.com already posted a pointer to the wikipedia 
article describing the required algorithm in detail.

4) I don't know what "no built-in functions should be used" means.  I 
assume it means, "don't call sort()"?  If you can't even call 
int.__lt__(), it's going to be really hard to do this.



More information about the Python-list mailing list