Click here to Skip to main content
15,894,343 members
Home / Discussions / Algorithms
   

Algorithms

 
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 
Questionwhich one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
huma satti4-May-08 20:46
huma satti4-May-08 20:46 
AnswerRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
Giorgi Dalakishvili4-May-08 21:12
mentorGiorgi Dalakishvili4-May-08 21:12 
GeneralRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
73Zeppelin4-May-08 22:07
73Zeppelin4-May-08 22:07 
GeneralRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
huma satti5-May-08 0:41
huma satti5-May-08 0:41 
AnswerRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
73Zeppelin4-May-08 22:00
73Zeppelin4-May-08 22:00 
GeneralRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
huma satti5-May-08 0:42
huma satti5-May-08 0:42 
GeneralRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
Jörgen Sigvardsson14-Jun-08 11:35
Jörgen Sigvardsson14-Jun-08 11:35 
AnswerRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
CPallini4-May-08 22:26
mveCPallini4-May-08 22:26 
GeneralRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
huma satti5-May-08 0:42
huma satti5-May-08 0:42 
AnswerRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
DavidNohejl5-May-08 4:05
DavidNohejl5-May-08 4:05 
QuestionRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
Maximilien6-May-08 10:32
Maximilien6-May-08 10:32 
AnswerRe: which one is smaller n pow 2, 1000 pow n, n pow n, n pow 1000 , when n value is nearer to infinite Pin
73Zeppelin6-May-08 10:59
73Zeppelin6-May-08 10:59 
QuestionNeed help inverting a laplace function [modified] Pin
MarkB7773-May-08 20:38
MarkB7773-May-08 20:38 
AnswerRe: Need help inverting a laplace function Pin
73Zeppelin4-May-08 0:29
73Zeppelin4-May-08 0:29 
GeneralRe: Need help inverting a laplace function Pin
MarkB7776-May-08 21:36
MarkB7776-May-08 21:36 

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.