MCPcopy Create free account
hub / github.com/TheAlgorithms/C / oddEvenSort

Function oddEvenSort

sorting/odd_even_sort.c:52–80  ·  view source on GitHub ↗

* @brief oddEvenSort sorts the array using the algorithm described above. * @details * A boolean varaible(isSorted) is declared and initialised to "false". * In the while loop, the variable(isSorted) is then set to "true". * During even phase the for loop loops through the array, touching just the even indexes. * i.e arr[0], arr[2], arr[4] and so on. * While during the odd phase, the for lo

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

testFunction · 0.85

Calls 1

swapFunction · 0.70

Tested by

no test coverage detected