Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/05/2013, 12:43
Avatar de Carlangueitor
Carlangueitor
Moderador ლ(ಠ益ಠლ)
 
Fecha de Ingreso: marzo-2008
Ubicación: México
Mensajes: 10.037
Antigüedad: 16 años, 1 mes
Puntos: 1329
Respuesta: Permutaciones de array

Pues supongo que en cualquier lenguaje se puede, por ejemplo en python tienes el método itertools:

Código Python:
Ver original
  1. In [1]: import itertools
  2.  
  3. In [2]: itertools.permutations([1, 2, 3, 4])
  4. Out[2]: <itertools.permutations at 0xa790a7c>
  5.  
  6. In [3]: for i in itertools.permutations([1, 2, 3, 4]):
  7.    ...:     print i
  8.    ...:    
  9. (1, 2, 3, 4)
  10. (1, 2, 4, 3)
  11. (1, 3, 2, 4)
  12. (1, 3, 4, 2)
  13. (1, 4, 2, 3)
  14. (1, 4, 3, 2)
  15. (2, 1, 3, 4)
  16. (2, 1, 4, 3)
  17. (2, 3, 1, 4)
  18. (2, 3, 4, 1)
  19. (2, 4, 1, 3)
  20. (2, 4, 3, 1)
  21. (3, 1, 2, 4)
  22. (3, 1, 4, 2)
  23. (3, 2, 1, 4)
  24. (3, 2, 4, 1)
  25. (3, 4, 1, 2)
  26. (3, 4, 2, 1)
  27. (4, 1, 2, 3)
  28. (4, 1, 3, 2)
  29. (4, 2, 1, 3)
  30. (4, 2, 3, 1)
  31. (4, 3, 1, 2)
  32. (4, 3, 2, 1)

Saludos
__________________
Grupo Telegram Docker en Español