Johnson Trotter Algorithm - Generate Permutations
Автор: Lam Duong
Загружено: 2020-03-22
Просмотров: 25196
If you noticed the execution of the algorithm step-by-step, you will see that this algorithm indeed will take O(n!) run-time, where n is the number of elements. This may be effective at generating a permutation of a sequence of numbers, but this is still a horrible runtime. The algorithm itself is easy to implement once you see how it works.
My code can be found at: https://github.com/lamduong33/LamAlgo...
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: