Steven D'Aprano st...@remove-this-cybersource.com.au writes:
On Sat, 13 Dec 2008 19:17:41 +, Duncan Booth wrote:
I think you must have fallen asleep during CS101. The lower bound for
sorting where you make a two way branch at each step is O(n * log_2 n),
but if you can choose between k
Thank you guys for help and support! My homework is done and waiting
for grading.
Here it comes - bucket sort with time complexity O(n) == linear complexity
#! /usr/bin/python
def sort(numbers):
sort n positive integers in O(n) provided that they are all from
interval [1, n^2]
N
On Sat, 13 Dec 2008 19:17:41 +, Duncan Booth wrote:
Diez B. Roggisch de...@nospam.web.de wrote:
David HláÄik schrieb:
Hi guys,
i am really sorry for making offtopic, hope you will not kill me, but
this is for me life important problem which needs to be solved within
next 12
Lie Ryan wrote:
You know what you just did? You've
just found a problem that was supposed to be an example of unsolvable
problem.
It has happened before, why not again?
There's a big difference between an unsolvable problem and an
unsolved problem. In the cases you're talking about, nobody
On Sun, 14 Dec 2008 21:42:33 +, Lie Ryan wrote:
I'm sure someday, there will be a student who comes to class late and
sees this on the board: Design a comparison sorting algorithm that has
better than O(n * log n) lower bound complexity. The unsuspecting
student copied it, thinking it's a
Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
All the positive thinking in the world won't help you:
* make a four-sided triangle;
* split a magnet into two individual poles;
These two are fundamentally different problems.
The first is impossible by definition. The
On Sun, 14 Dec 2008 21:18:03 -0500, Roy Smith wrote:
Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
All the positive thinking in the world won't help you:
* make a four-sided triangle;
* split a magnet into two individual poles;
These two are fundamentally different
On Mon, 15 Dec 2008 01:48:43 +, Steven D'Aprano wrote:
Some things really don't have a solution, no matter how much power of
positive thinking you apply to it.
Some may, only not with the current understanding of the universe. Well,
I agree that there are a few things that is straight out
Hi guys,
i am really sorry for making offtopic, hope you will not kill me, but
this is for me life important problem which needs to be solved within
next 12 hours..
I have to create stable algorithm for sorting n numbers from interval
[1,n^2] with time complexity O(n) .
Can someone please give
David Hláčik schrieb:
Hi guys,
i am really sorry for making offtopic, hope you will not kill me, but
this is for me life important problem which needs to be solved within
next 12 hours..
I have to create stable algorithm for sorting n numbers from interval
[1,n^2] with time complexity O(n) .
Unless I grossly miss out on something in computer science 101, the lower
bound for sorting is O(n * log_2 n). Which makes your task impossible,
unless there is something to be assumed about the distribution of numbers in
your sequence.
There is n numbers from interval [1 , n^2]
I should do
On Sat, Dec 13, 2008 at 2:00 PM, David Hláčik da...@hlacik.eu wrote:
Unless I grossly miss out on something in computer science 101, the lower
bound for sorting is O(n * log_2 n). Which makes your task impossible,
unless there is something to be assumed about the distribution of numbers in
David Hláčik da...@hlacik.eu wrote:
I have to create stable algorithm for sorting n numbers from interval
[1,n^2] with time complexity O(n) .
Some kind of radix sort or counting sort. These algo. has O(n) complexity.
w.
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch de...@nospam.web.de wrote:
David HláÄik schrieb:
Hi guys,
i am really sorry for making offtopic, hope you will not kill me, but
this is for me life important problem which needs to be solved within
next 12 hours..
I have to create stable algorithm for sorting n
Diez B. Roggisch wrote:
David Hláčik schrieb:
Hi guys,
i am really sorry for making offtopic, hope you will not kill me, but
this is for me life important problem which needs to be solved within
next 12 hours..
I have to create stable algorithm for sorting n numbers from interval
[1,n^2] with
Duncan Booth schrieb:
Diez B. Roggisch de...@nospam.web.de wrote:
David Hlá�ik schrieb:
Hi guys,
i am really sorry for making offtopic, hope you will not kill me, but
this is for me life important problem which needs to be solved within
next 12 hours..
I have to create stable algorithm
David Hláčik da...@hlacik.eu writes:
Hi guys,
i am really sorry for making offtopic, hope you will not kill me, but
this is for me life important problem which needs to be solved within
next 12 hours..
I have to create stable algorithm for sorting n numbers from interval
[1,n^2] with time
On Sat, 13 Dec 2008 19:17:41 +, Duncan Booth wrote:
I think you must have fallen asleep during CS101. The lower bound for
sorting where you make a two way branch at each step is O(n * log_2 n),
but if you can choose between k possible orderings in a single
comparison you can get O(n *
18 matches
Mail list logo