0

Hi Guys

Ive come accross an interesting application which sorts out an array. Nothing special about that right? But then it gets a bit messy as it can sort out numerous array based on the original.

So Lets say I provide it with an Array of 4 number (3,4,1,2) and want it descending the output is (4,3,2,1) perfect.

Now if i provided it with another Array of 4 (7,5,8,9) I get (5,8,7,9).

So bit of a math probelm to solve guys.

How does 4,3,2,1 correlate with 5,8,7,9?

As part of the problem the code for the app is hidden so i cant provide any :(

Edited by ogsirus

4
Contributors
6
Replies
29
Views
1 Year
Discussion Span
Last Post by Reverend Jim
0

I dont think the application is public. It was for a test I recently done.

It used a alot of familar command which resembled the .net framework, close to C# but not quite there.

-1

It would appear the code doesn't sort at all. Can you please explain what you mean by

But then it gets a bit messy as it can sort out numerous array based on the original.

Edited by Reverend Jim

0

Well my initial solution what that that second array orders based on the original indexing of the first array. However you can pass it more than 2 arrays.

So if the first array had the value of 1 in index 3. this would move to index 0. Lets say the second array has the value of 5 in index 3, this would now move to index 0 despite potential having a higher value than other indexes.

This is not the case though

Edited by ogsirus

-1

This is not the case though

It's not going to help to describe what it doesn't do. You'll have to provide more examples to show what it does do.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.