Search code examples
algorithmsortingsorting-network

sorting network for 8 elements


How do I sort a list of 8 elements with sorting network?

for example given the list: 12,5,9,14,33,17,10,8

I know how to sort a list of 4 elements.. what is the rule to sort any list of n elements?


Solution

  • That depends on how you would like to sort it, different sorting algorithm may result in different network. You can check this wiki page about sorting network.