← BYTES
Algorithms·Starter·Ref: 12.1.12

What does it mean for a sorting algorithm to be 'in-place'?

Have a question about this video? Mention reference 12.1.12 when you contact us.

a.It sorts data without ever comparing two elements
b.It sorts the data using only a small, constant amount of extra memory beyond the input array itself
c.It can only sort arrays of size 1
d.It always finishes in O(n) time
An in-place algorithm rearranges elements within the original data structure using O(1) (or sometimes O(log n) for recursion stack space) extra memory, rather than allocating a second array of comparable size -- insertion sort and heapsort are classic in-place sorts; a typical merge sort implementation is not.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES12112#Algorithms