## maximal difference problem

Discuss all kind of algorithms and data structures from their mathematical and programming sides.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

### maximal difference problem

You are given n real (unsorted) numbers. You have to compute the maximal difference between two consecutive numbers in sorted order without sorting the numbers. You can use additions, subtractions, multiplications, divisions and "floor" function.
alnet

Posts: 2
Joined: Sat Feb 26, 2005 8:44 am

Seems like a homework to me. Prove use that you have at least tried.

t i l e x

Posts: 3604
Joined: Wed Dec 03, 2003 3:59 pm
Location: Québec (Canada)

It's a homework. It was given in our course and I have a solution for it.
alnet

Posts: 2
Joined: Sat Feb 26, 2005 8:44 am

Show some code you have written so far and I will try to help you then.
PS: Is there a question except than "code it for me" ?.

t i l e x

Posts: 3604
Joined: Wed Dec 03, 2003 3:59 pm
Location: Québec (Canada)

alnet wrote:It's a homework. It was given in our course and I have a solution for it.
If you have a solution to it, then why are you posting it?

DannyBoy

Posts: 1160
Joined: Fri Feb 13, 2004 12:56 pm
Location: In the Billiard Room with the Lead Pipe

Perhaps he is testing us?
"Given enough time, man can do anything with a bit of string and some Tinker toys." Bruce Bolden, Senior Instructor at the University of Idaho.

leas5040

Posts: 1214
Joined: Mon Apr 12, 2004 9:51 pm
Location: Moscow, ID

Return to Algorithms & Data Structures

### Who is online

Users browsing this forum: No registered users and 0 guests