Find Jobs
Hire Freelancers

c++ permutations A-Z

$30-100 USD

Terminado
Publicado hace más de 15 años

$30-100 USD

Pagado a la entrega
We need a simple c++ permutations A-Z Algorithm written a certain way. 1. No Recursive functions 2. Must accept N-Length and N-Start for example if I specify in the parameters to start at 4 , and end at 8. 3. Must accept a string for the permutations, if I specify abc123 than it must generate every possible pattern for that string ## Deliverables Here is a example Algorithm , please note you can not use this code or design your algorithm like this since it does not accept a variable length permutation int main(int argc, char *argv[]) { int i,j,k; char list[]="ABCDEFGHIJKLMNOPQR <wbr />STUVWXYZ01<wbr />23456789";<wbr /> char string_result[4]; string_result[3]=0; /* NUL terminate the string */ for (i=0; i<36; i++) { string_result[0]=list[i]; /* Set x__ */ for (j=0; j<36; j++) { string_result[1]=list[j]; /* Set _y_ */ for (k=0; k<36; k++) { string_result[2]=list[k]; /* Set __z */ printf("%s\n",string_resul<wbr />t); /* Print xyz */ } } } return 0; } The thing to realize is that it has a string that it generates permutations from which is what I need. The requires for Algorithm design or as follows. 1. No Recursive design 2. No STL design 3. Must accept a variable start position and a variable end position 4. If starting from 4th position you can specify which permutation you want to start at, so if I specify the 5th permutation with a permutation string of 01 it would start at 0101 5. Must have one variable it stores results in like below void output_chars(unsigned int start, unsigned int end,char * ranges) { #define CYCLE_RANGE(v1) for(unsigned int j1=0;j1<strlen(ranges);j1++) \ { \ output[v1] = ranges[j1]; \ std::cout << output << std::endl; \ } char output[32]; ZeroMemory(output,32); if(start >=end) return; for(unsigned int i2 = 0;i2<end;i2++) //reset the string output[i2] = ranges[0]; unsigned int string_length = 0; for(unsigned int i = start;i<end;i++) { output[i+1]=0; //allocate new memory string_length = strlen(output); unsigned int string_pos = i; while(string_pos) { //how many position to the right of me unsigned int right_pos = i - string_pos; for(unsigned int r1 = i;r1>string_pos;r1--) { for(unsigned int i2 = 0;i2<strlen(ranges);i2++) { output[string_pos-1] = ranges[i2]; std::cout << output << std::endl; } CYCLE_RANGE(r1) } //CYCLE_RANGE(string_pos) string_pos--; } for(unsigned int i2 = 0;i2<end;i2++) //reset the string output[i2] = ranges[0]; } return; } Notice how it only stores data in the output variable, this is very important and this is how the algorithm should be designed If you have any questions please let me know and I am willing to pay what ever it takes.
ID del proyecto: 3088029

Información sobre el proyecto

20 propuestas
Proyecto remoto
Activo hace 16 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
See private message.
$7 USD en 5 días
5,0 (32 comentarios)
5,9
5,9
20 freelancers están ofertando un promedio de $37 USD por este trabajo
Avatar del usuario
See private message.
$21,25 USD en 5 días
5,0 (183 comentarios)
6,5
6,5
Avatar del usuario
See private message.
$42,50 USD en 5 días
4,8 (96 comentarios)
6,6
6,6
Avatar del usuario
See private message.
$17 USD en 5 días
5,0 (77 comentarios)
6,0
6,0
Avatar del usuario
See private message.
$41,65 USD en 5 días
5,0 (50 comentarios)
5,1
5,1
Avatar del usuario
See private message.
$42,50 USD en 5 días
5,0 (37 comentarios)
4,4
4,4
Avatar del usuario
See private message.
$42,50 USD en 5 días
5,0 (76 comentarios)
4,2
4,2
Avatar del usuario
See private message.
$59,50 USD en 5 días
5,0 (4 comentarios)
3,1
3,1
Avatar del usuario
See private message.
$32,30 USD en 5 días
5,0 (5 comentarios)
2,8
2,8
Avatar del usuario
See private message.
$42,50 USD en 5 días
5,0 (8 comentarios)
2,8
2,8
Avatar del usuario
See private message.
$22,95 USD en 5 días
5,0 (4 comentarios)
1,9
1,9
Avatar del usuario
See private message.
$59,50 USD en 5 días
4,0 (6 comentarios)
2,3
2,3
Avatar del usuario
See private message.
$15,30 USD en 5 días
5,0 (1 comentario)
0,4
0,4
Avatar del usuario
See private message.
$41,65 USD en 5 días
5,0 (3 comentarios)
0,5
0,5
Avatar del usuario
See private message.
$63,75 USD en 5 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$21,25 USD en 5 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$80,75 USD en 5 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$21,25 USD en 5 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$25,50 USD en 5 días
5,0 (1 comentario)
0,0
0,0
Avatar del usuario
See private message.
$42,50 USD en 5 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
Owings Mills, United States
4,7
5
Miembro desde abr 26, 2008

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.