Click here to Skip to main content
15,915,834 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Iterating and comparing two Dictionary objects Pin
73Zeppelin9-May-08 7:52
73Zeppelin9-May-08 7:52 
AnswerRe: Iterating and comparing two Dictionary objects Pin
Alan Balkany9-May-08 10:33
Alan Balkany9-May-08 10:33 
AnswerRe: Iterating and comparing two Dictionary objects Pin
Mark Churchill18-May-08 4:40
Mark Churchill18-May-08 4:40 
GeneralRe: Iterating and comparing two Dictionary objects Pin
supercat924-May-08 15:12
supercat924-May-08 15:12 
Question(Possibly) Simple Maths Pin
Reelix9-May-08 0:51
Reelix9-May-08 0:51 
AnswerRe: (Possibly) Simple Maths Pin
Cedric Moonen9-May-08 1:08
Cedric Moonen9-May-08 1:08 
GeneralRe: (Possibly) Simple Maths Pin
Reelix9-May-08 2:14
Reelix9-May-08 2:14 
AnswerRe: (Possibly) Simple Maths Pin
Alan Balkany9-May-08 3:37
Alan Balkany9-May-08 3:37 
AnswerRe: (Possibly) Simple Maths Pin
CPallini9-May-08 4:20
mveCPallini9-May-08 4:20 
AnswerRe: (Possibly) Simple Maths Pin
73Zeppelin9-May-08 7:45
73Zeppelin9-May-08 7:45 
Questionneed similar to Excel's "Goal Seek" in C/C++ Pin
KimN6-May-08 9:04
KimN6-May-08 9:04 
AnswerRe: need similar to Excel's "Goal Seek" in C/C++ Pin
73Zeppelin6-May-08 9:17
73Zeppelin6-May-08 9:17 
GeneralRe: need similar to Excel's "Goal Seek" in C/C++ Pin
KimN6-May-08 10:06
KimN6-May-08 10:06 
GeneralRe: need similar to Excel's "Goal Seek" in C/C++ Pin
73Zeppelin6-May-08 10:29
73Zeppelin6-May-08 10:29 
AnswerRe: need similar to Excel's "Goal Seek" in C/C++ Pin
cp98766-May-08 15:57
cp98766-May-08 15:57 
GeneralRe: need similar to Excel's "Goal Seek" in C/C++ Pin
73Zeppelin6-May-08 19:19
73Zeppelin6-May-08 19:19 
QuestionSorting multiple lists so they are unique Pin
jrg20005-May-08 1:10
jrg20005-May-08 1:10 
AnswerRe: Sorting multiple lists so they are unique Pin
73Zeppelin6-May-08 9:19
73Zeppelin6-May-08 9:19 
GeneralRe: Sorting multiple lists so they are unique Pin
jrg20007-May-08 23:24
jrg20007-May-08 23:24 
GeneralRe: Sorting multiple lists so they are unique Pin
cp98768-May-08 20:06
cp98768-May-08 20:06 
AnswerRe: Sorting multiple lists so they are unique Pin
cp98766-May-08 20:40
cp98766-May-08 20:40 
GeneralRe: Sorting multiple lists so they are unique Pin
jrg20007-May-08 23:18
jrg20007-May-08 23:18 
AnswerRe: Sorting multiple lists so they are unique Pin
Andrew Rissing8-May-08 6:48
Andrew Rissing8-May-08 6:48 
I would assume the best way, is the following.

1. Assume the first list will not be sorted.
2. Move down the first list, verifying that each subsequent list doesn't have the matching item.
3. If an item matches in that list with the current item in the first list, push it to the end.
4. Iterate till the end.
5. Once at the end, you look over the last items, if any match the final element of the first list, then you must swap that item with one of the items in the list that doesn't conflict with the first list's item.

Basically, once you're at the end, you're down to a single lookup for each list. That should be as simple as you can get it.

Does that make sense?
GeneralRe: Sorting multiple lists so they are unique Pin
cp98768-May-08 11:52
cp98768-May-08 11:52 
AnswerRe: Sorting multiple lists so they are unique Pin
Cyrilix8-Jun-08 22:01
Cyrilix8-Jun-08 22:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.