Skip to content

Instantly share code, notes, and snippets.

@jhonylucas74
Created January 20, 2015 20:03
Show Gist options
  • Save jhonylucas74/7b14de4109f472a25aeb to your computer and use it in GitHub Desktop.
Save jhonylucas74/7b14de4109f472a25aeb to your computer and use it in GitHub Desktop.
4-6-2-6-3-1-6
j------------
i------------
4-6-2-6-3-1-6 iguais
--j----------
i------------
4-6-2-6-3-1-6
----j--------
i------------
4-6-2-6-3-1-6 troca
----j--------
i------------
2-6-4-6-3-1-6 troca
------j------
i------------
2-6-4-6-3-1-6
--------j----
i------------
2-6-4-6-3-1-6
----------j--
i------------
2-6-4-6-3-1-6 troca
----------j--
i------------
1-6-4-6-3-2-6 troca
Na posição i está o numero mais menor de todos.
Se mudar a posição de ir e seguir a mesma lógica
no lugar do 6 vai sero número 2.
----------j--
--i----------
1-2-6-6-4-3-6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment