Closed hoytech closed 12 years ago
I'm going to take the suggestion but alter the form. There will be a new function that I'm tentatively calling nw_sort_stats(), which will return the swap count that you want, but also any other pieces of information that may be thought of later (suggestions welcome).
This leaves the return value of nw_sort() unchanged.
This was useful for creating the following slides in my presentation:
http://hoytech.github.com/sorting-networks/#slide29 http://hoytech.github.com/sorting-networks/#slide30