1. Home
  2. Explore
  3. Computer Science
  4. Sorting Algorithms & BBC Micro

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Sorting Algorithms & BBC Micro

  • 35Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Sorting Algorithm Sounds
When a sorting algorithm swaps a pair of elements, it plays a sound, and each time it compares elements, it plays a
.

35 questions

  1. 1
    When a sorting algorithm swaps a pair of elements, it plays a sound, and each time it compares elements, it plays a
    _____
    .
    Hint

    Think about what kind of auditory feedback is given when elements are compared.

    Answer

    noise

  2. 2
    The BBC commissioned a British company called Acorn to make the BBC micro computer to introduce people to computers and
    _____
    .
    Hint

    The project aimed to introduce people to both hardware and a specific skill set.

    Answer

    programming

  3. 3
    The Acorn A5000, which is a descendant of the BBC micro, features an
    _____
    chip.
    Hint

    Consider the type of processor architecture mentioned for the A5000.

    Answer

    ARM

  4. 4
    The Acorn A5000 has a BBC
    _____
    interpreter built into it.
    Hint

    Think about the programming language interpreter commonly associated with Acorn computers.

    Answer

    BASIC

  5. 5
    Similar to the BBC micro, the operating system of the Acorn A5000 is stored in
    _____
    .
    Hint

    Consider where the core operating system files are located for quick boot-up.

    Answer

    ROM

  6. 6
    Unlike the BBC micro, the Acorn A5000 boots up into a
    _____
    .
    Hint

    Consider the visual interface that allows interaction with a mouse and clickable elements.

    Answer

    GUI

  7. 7
    On the Acorn A5000, the clickable bar at the bottom of the screen is called the icon
    _____
    .
    Hint

    This interface element contains icons for accessing different functions.

    Answer

    bar

  8. 8
    In the context of the Acorn operating system, 'apps' is simply short for
    _____
    .
    Hint

    Think about the full word that 'apps' abbreviates.

    Answer

    applications

  9. 9
    A C++ program visualizing sorting algorithms would play a certain
    _____
    depending on the value of the element being processed.
    Hint

    Think about the characteristic of sound that changes based on the element's value.

    Answer

    pitch

  10. 10
    A
    _____
    is a collection of code written by other people that performs a certain task.
    Hint

    This term refers to pre-written modules of code that can be incorporated into new programs.

    Answer

    library

  11. 11
    In the triangle drawing program, MODE 27 sets the screen resolution and available
    _____
    .
    Hint

    Besides resolution, what other visual characteristic does MODE often control?

    Answer

    colors

  12. 12
    The REPEAT UNTIL FALSE block in BBC BASIC creates an infinite loop because FALSE never evaluates to
    _____
    .
    Hint

    Consider the condition that would normally terminate a REPEAT UNTIL loop.

    Answer

    TRUE

  13. 13
    In the BBC BASIC program, the random number for color is scaled to be in the range 0 to 255 for the
    _____
    value.
    Hint

    This value determines how high or low a sound will be.

    Answer

    pitch

  14. 14
    A value of 0 for pitch represents the
    _____
    pitch the system can produce.
    Hint

    What end of the spectrum does zero usually represent in a range of values?

    Answer

    lowest

  15. 15
    The PLOT line in the BBC BASIC program is responsible for drawing a
    _____
    .
    Hint

    Recall the specific geometric shape that was drawn on the screen.

    Answer

    triangle

  16. 16
    To slow down the BBC BASIC program, a line can be commented out using `
    _____
    `.
    Hint

    This keyword is commonly used in BASIC for adding non-executable comments.

    Answer

    REM

  17. 17
    In the game 'Dr Audio', the pitch of the tone varies according to how far your guess is from the correct
    _____
    .
    Hint

    The game involves guessing a specific numerical value.

    Answer

    number

  18. 18
    The SOUND command in BBC BASIC takes four different
    _____
    .
    Hint

    Think about the number of inputs or arguments required by the command.

    Answer

    parameters

  19. 19
    The first parameter of the SOUND command specifies the
    _____
    you want to play on.
    Hint

    This determines which audio output stream or voice is used.

    Answer

    channel

  20. 20
    For the SOUND command, a volume of -15 is the loudest, while a volume of
    _____
    is the quietest.
    Hint

    Consider the opposite end of the volume spectrum within the specified range.

    Answer

    0

  21. 21
    The ABS a - b part of the SOUND command calculates the
    _____
    value of the difference between two numbers.
    Hint

    This mathematical operation ensures a positive result regardless of the order of subtraction.

    Answer

    absolute

  22. 22
    The duration of the note in the SOUND command is measured in
    _____
    .
    Hint

    Think about the unit of time used for short durations, often related to hundredths of a second.

    Answer

    centiseconds

  23. 23
    With bubble sort, elements are compared and kept
    _____
    if they are bigger than the ones in front of them until they reach the end.
    Hint

    Consider the primary action performed on out-of-order elements in bubble sort.

    Answer

    swapping

  24. 24
    In the bubble sort visualization,
    _____
    elements are considered unsorted.
    Hint

    Think about the color designated for elements that are still out of order.

    Answer

    red

  25. 25
    For bubble sort, if the input size is doubled, the sorting time should take
    _____
    times as long because it runs with the square of the input size.
    Hint

    Consider the relationship between doubling the input and squaring the effect.

    Answer

    four

  26. 26
    Quick sort works by partitioning the list by picking an element called a
    _____
    and placing smaller elements on one side and larger on the other.
    Hint

    This chosen element acts as a reference point for partitioning the list.

    Answer

    pivot

  27. 27
    If you want to do proper speed tests for sorting algorithms, you need to turn off the
    _____
    because they slow it down a lot.
    Hint

    Visual representations often add computational overhead, affecting performance benchmarks.

    Answer

    graphics

  28. 28
    Selection sort goes through the unsorted list, finds the lowest element, and places it into the
    _____
    list.
    Hint

    This algorithm incrementally builds up the final ordered list.

    Answer

    sorted

  29. 29
    Selection sort has the same time complexity as bubble sort, which is
    _____
    squared.
    Hint

    Think about the notation used to describe quadratic time complexity.

    Answer

    N

  30. 30
    Selection sort performs fewer
    _____
    compared to bubble sort, doing at most one per element.
    Hint

    This specific operation is minimized in selection sort compared to bubble sort.

    Answer

    swaps

  31. 31
    Quick sort and Heap Sort both run in
    _____
    log N time complexity.
    Hint

    This common efficiency rating for sorting algorithms is significantly faster than N squared.

    Answer

    N

  32. 32
    Heap Sort uses a data structure called a
    _____
    .
    Hint

    This is a specific type of tree-based data structure that maintains a particular ordering property.

    Answer

    heap

  33. 33
    A heap data structure is represented by a binary tree where every element has children who are
    _____
    than it.
    Hint

    Consider the ordering property that defines a max-heap (where the parent is larger than its children).

    Answer

    smaller

  34. 34
    In Heap Sort, the largest element is always at position
    _____
    during the heap building phase.
    Hint

    Think about the common index for the root of an array-represented binary tree.

    Answer

    zero

  35. 35
    The 'heap' data structure is different from the 'heap' that refers to an area of
    _____
    memory.
    Hint

    This refers to a region of memory used for dynamic allocation, distinct from the stack.

    Answer

    program

1 of 35
Question 1 of 35

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent