Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'algorithm': 0.04; "subject:' ": 0.07; 'subject:help': 0.08; 'builtin': 0.09; 'subject:using': 0.09; 'python': 0.11; "'n'": 0.16; 'assumptions': 0.16; 'received:65.55.116.7': 0.16; 'subject: \n ': 0.16; 'worst': 0.16; 'subject:python': 0.16; 'elements': 0.16; 'code.': 0.18; 'to:name:python-list@python.org': 0.22; 'received:65.55.116': 0.24; 'looks': 0.24; 'sort': 0.25; 'mention': 0.26; 'header:In- Reply-To:1': 0.27; 'skip:- 40': 0.29; 'subject:list': 0.30; 'url:mailman': 0.30; 'code': 0.31; 'anyone': 0.31; 'probably': 0.32; 'url:python': 0.33; 'fri,': 0.33; 'date:': 0.34; 'something': 0.35; 'really': 0.36; 'url:listinfo': 0.36; "didn't": 0.36; 'url:org': 0.36; 'example,': 0.37; 'list': 0.37; 'email addr:python.org': 0.37; 'to:addr:python-list': 0.38; 'subject:': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'how': 0.40; "you're": 0.61; 'email addr:gmail.com': 0.63; 'more': 0.64; 'email name:python-list': 0.65; 'special': 0.74; 'complexity': 0.84; 'average': 0.93; '2013': 0.98 X-TMN: [/xvElVSH+6mV/hw3FkQxvKqq7QnbGHJh] X-Originating-Email: [carlosnepomuceno@outlook.com] From: Carlos Nepomuceno To: "python-list@python.org" Subject: RE: help how to sort a list in order of 'n' in python without using inbuilt functions?? Date: Fri, 24 May 2013 16:06:59 +0300 Importance: Normal In-Reply-To: References: Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 24 May 2013 13:06:59.0247 (UTC) FILETIME=[931B8BF0:01CE587F] X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369400827 news.xs4all.nl 15924 [2001:888:2000:d::a6]:56815 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45882 lol wtf?=0A= =0A= If 'n' is the quantity of elements to be sorted there's =0A= no way you can write an algorithm with complexity O(n) for the worst =0A= case not knowing something special about the data.=0A= =0A= For example=2C Quicksort will give you O(n*(log(n)) on average case (O(n^2)= in the worst case).=0A= =0A= You gotta be much more specific than that if you really need an O(n) code.= =0A= =0A= There's probably assumptions you didn't mention about the data if O(n) it's= really what you're looking for.=0A= =0A= PS: Looks like a joke as stated..=0A= =0A= ----------------------------------------=0A= > Date: Fri=2C 24 May 2013 01:04:51 -0700=0A= > Subject: help how to sort a list in order of 'n' in python without using = inbuilt functions??=0A= > From: lokeshkoppaka@gmail.com=0A= > To: python-list@python.org=0A= >=0A= > i need to write a code which can sort the list in order of 'n' without us= e builtin functions=0A= > can anyone help me how to do?=0A= > --=0A= > http://mail.python.org/mailman/listinfo/python-list =