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

Algorithms

 
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 
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 
Ah, this should be easy.

Assume you have list1 fully filled.

list2 = new list<char>();
for (int i = 1; i < list1.size(); i++)
{
    list2.push_back(list1.at(i));
}
list2.push_back(list1.at(0);
</char>


Basically, you're shifting indices by one, and keep doing it for every index. The theoretical maximum number of lists you can make is the size of the initial list, since you can only shift indices that much before they repeat again (informal proof). I can demonstrate this more formally, but I won't write it here.
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 
AnswerRe: Need help inverting a laplace function Pin
Roger Alsing11-May-08 21:48
Roger Alsing11-May-08 21:48 
GeneralRe: Need help inverting a laplace function Pin
MarkB77712-May-08 13:30
MarkB77712-May-08 13:30 

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.