4 ms·
It can do some basic coding. The code syntax highlighting looks cool. > Do a quick sort in python > Here's an example of a quicksort implementation in Python:
by MMMercy2 4y ago
It can do some basic coding. The code syntax highlighting looks cool.
> Do a quick sort in python
> Here's an example of a quicksort implementation in Python:
def quicksort(array):
if len(array) <= 1:
return array
pivot = array[0]
less = [x for x in array[1:] if x <= pivot]
greater = [x for x in array[1:] if x > pivot]
return quicksort(less) + [pivot] + quicksort(greater)
- fauxpause_ 3y agoQuick sort is a terrible test case as it will have numerous training data examples of this exact concept