Searching and Sorting Algorithms

Description

A level Computing Flashcards on Searching and Sorting Algorithms, created by Josh Calvert on 17/01/2017.
Josh Calvert
Flashcards by Josh Calvert, updated more than 1 year ago
Josh Calvert
Created by Josh Calvert about 7 years ago
71
2

Resource summary

Question Answer
Which search/sorting algorithm is this pseudo-code from and what is its function? while left <= right and array[left] <= p left = left + 1 Quick Sort Until the left check value crosses the right check value or the left check value is less than the pivot, keep checking
Which search/sorting algorithm is this pseudo-code from and what is its function? while pos > 0 and array[position - 1] > val array[pos] = array[pos - 1] pos = pos - 1 Insertion Sort Starting at the highest position, until the value being checked is less than the number above it or is the lowest number, check the next value
Which search/sorting algorithm is this pseudo-code from and what is its function? if array[midpoint] < item first = midpoint + 1 else last = midpoint - 1 Binary Search If the search value is greater than the mid value of the list, repeat between the mid index + 1 and last. Otherwise, repeat between the mid index - 1 and first
Which search/sorting algorithm is this pseudo-code from and what is its function? if right < left flag = true else temp = array[left] array[left] = array[right] array[right] = temp Quick Sort If the left and right markers have crossed, the array is sorted. Otherwise, swap the values at the left and right markers
Which search/sorting algorithm is this pseudo-code from and what is its function? temp = array[i] array[i] = array[i + 1] array[i + 1] = temp Bubble Sort Swap the value in position "i" with the value in position "i + 1"
Which search/sorting algorithm is this pseudo-code from and what is its function? while i = 0 < arraylength - 1 and flag = true flag = false for j = 0 to arraylength - i - 2 Bubble Sort Until a whole pass of the list is complete or the list is sorted, assume the list isn't sorted and cycle through all numbers that haven't been checked this pass
Which search/sorting algorithm is this pseudo-code from and what is its function? while i = 0 < arraylength and flag = false if array[i] = item flag = true Linear Search Check every value in the list until you find what you want. If you do, flag you found it for use elsewhere
Which search/sorting algorithm is this pseudo-code from and what is its function? left = array[0, mid] right = array[mid, arraylength - 1] run(left) run(right) Merge Sort Split the array into left and right halves, pause execution and run algorithm on left half and then run on right half
Show full summary Hide full summary

Similar

A level Computing Quiz
Zacchaeus Snape
Types and Components of Computer Systems
Jess Peason
Input Devices
Jess Peason
Output Devices
Jess Peason
Computing
Kwame Oteng-Adusei
Pack of playing cards answer
Karl Taylor
Code Challenge Flow Chart
Charlotte Hilton
Data Structures & Algorithms
Reuben Caruana
Algorithms ♡
lauren ♥
Computational Thinking ♡
lauren ♥
Algorithms
George Bettley