MYTUTOR SUBJECT ANSWERS

560 views

Name several sort algorithms of an array, their working principles and their efficency.

Bubble sort (compare two elements and switch them if one of them is higher than other, depending on ordering preference), iterate over the whole array of elements. Efficency O(n2).

Insert sort, make a separate list, where you insert the elements in an ordered manner, that is start at the smallest element and go until an element that is bigger than the input or end of list and insert it before that. Efficency O(n2).

Selection sort, iterate over the whole array and find the smallest element, put it into start, then iterate from smallest +1, then smallest +2. Efficency O(n2).

Merge sort, split array into smaller arrays until size 1 is reached, then assume size 1 is sorted, then merge them while sorting, the sub arrays. Efficency O(n logn).

Quicksort. Select a pivot point, split all elements that are larger than that to one side, smaller to other, then put the pivot, where it belongs. After do it on smaller arrays, when all is done, the arrays are merged and the final array is sorted. Efficency O(n logn).  

Egidijus S. IB Computing tutor, IB Maths tutor

2 years ago

Answered by Egidijus, an IB Computing tutor with MyTutor


Still stuck? Get one-to-one help from a personally interviewed subject specialist

2 SUBJECT SPECIALISTS

£22 /hr

Sara J.

Degree: Computing Science (Bachelors) - Glasgow University

Subjects offered:Computing, Maths+ 2 more

Computing
Maths
Geography
-Personal Statements-

“Undergraduate student at University of Glasgow with passion for Computing Science, Mathematics and Geography.”

£36 /hr

Dario P.

Degree: Computer Science (Masters) - Manchester University

Subjects offered:Computing, Maths+ 2 more

Computing
Maths
Italian
ICT

“I am Computer Science Russell Group student with experience in research and industry and strong mathematical skills, I enjoy tutoring and helping students consolidate their knowledge.”

About the author

£20 /hr

Egidijus S.

Degree: Informatics MInf (Masters) - Edinburgh University

Subjects offered:Computing, Maths

Computing
Maths

“Top tutor from the renowned Russell university group, ready to help you improve your grades.”

MyTutor guarantee

You may also like...

Posts by Egidijus

Add the binary numbers 100101 and 101001 and convert them to decimal (they are unsigned integers). What are possible issues when adding the numbers?

Name several sort algorithms of an array, their working principles and their efficency.

Name the memories in the computer and rate them by the amount of space and their price. When should which be used.

Show that the following system of equations has an infinite number of solutions. x+y+2z = -2; 3x-y+14z=6; x+2y=-5

Other IB Computing questions

Define the terms CU and ALU and briefly explain their roles in the CPU.

Explain the difference between the cache memory and the buffer.

Name several sort algorithms of an array, their working principles and their efficency.

View IB Computing tutors

We use cookies to improve your site experience. By continuing to use this website, we'll assume that you're OK with this. Dismiss

mtw:mercury1:status:ok