GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Searching and Sorting Algorithms

Josh Calvert Computing A level Englisch 8 Karten

Karten in diesem Stapel (8)

  1. 1Which search/sorting algorithm is this pseudo-code from and what is its function? while left <= right and array[left] <= p left = left + 1Quick Sort
    Until the left check value crosses the right check value or the left check value is less than the pivot, keep checking
  2. 2Which 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 - 1Insertion 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
  3. 3Which search/sorting algorithm is this pseudo-code from and what is its function? if array[midpoint] < item first = midpoint + 1 else last = midpoint - 1Binary 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
  4. 4Which 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] = tempQuick Sort
    If the left and right markers have crossed, the array is sorted. Otherwise, swap the values at the left and right markers
  5. 5Which search/sorting algorithm is this pseudo-code from and what is its function? temp = array[i] array[i] = array[i + 1] array[i + 1] = tempBubble Sort
    Swap the value in position "i" with the value in position "i + 1"
  6. 6Which 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 - 2Bubble 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
  7. 7Which 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 = trueLinear Search
    Check every value in the list until you find what you want. If you do, flag you found it for use elsewhere
  8. 8Which 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

Informationen

Beschreibung
A level Computing Karteikarten am Searching and Sorting Algorithms, erstellt von Josh Calvert am 17/01/2017.
Erstellt von
Josh Calvert
Aufrufe
134
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck