MCPcopy Create free account
hub / github.com/chaharnishant11/CodeIn10DSA / swap

Function swap

Sorting/Code/quickSort.py:3–7  ·  view source on GitHub ↗
(a, b, arr)

Source from the content-addressed store, hash-verified

1# implementation of quick sort in python
2
3def swap(a, b, arr):
4 if a!=b:
5 tmp = arr[a]
6 arr[a] = arr[b]
7 arr[b] = tmp
8
9def quick_sort(elements, start, end):
10 if start < end:

Callers 2

partitionFunction · 0.70
helperMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected