1. Home
  2. Explore
  3. Computer Science
  4. Programming Algorithms Explained

Study methods

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

Programming Algorithms Explained

  • 25Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Algorithmic Basics
The specific steps used to complete a computation are referred to as an
.

25 questions

  1. 1
    The specific steps used to complete a computation are referred to as an
    _____
    .
    Hint

    This term comes from a Persian polymath and describes the method or process to solve a problem.

    Answer

    algorithm

  2. 2
    The efficiency of an algorithm is generally better if it takes fewer
    _____
    to compute.
    Hint

    Consider what makes an algorithm faster or slower in its execution.

    Answer

    steps

  3. 3
    The term 'algorithm' originated from the Persian polymath Muḥammad ibn Mūsā al-Khwārizmī, who was one of the fathers of
    _____
    .
    Hint

    This mathematical field deals with symbols and the rules for manipulating these symbols.

    Answer

    algebra

  4. 4
    The crafting of efficient algorithms led to the evolution of the modern discipline known as
    _____
    Science.
    Hint

    This field studies computation and information.

    Answer

    Computer

  5. 5
    In computer science, a series of items like airfare prices is typically referred to as an
    _____
    .
    Hint

    This data structure stores a fixed-size sequential collection of elements of the same type.

    Answer

    array

  6. 6
    The sorting algorithm that involves repeatedly finding the smallest element from the unsorted part and putting it at the beginning is called
    _____
    Sort.
    Hint

    This algorithm 'selects' the minimum element from the remaining unsorted array and swaps it with the first unsorted element.

    Answer

    Selection

  7. 7
    In Selection Sort, a FOR loop is nested inside another FOR loop, meaning that sorting N items requires roughly N
    _____
    loops.
    Hint

    This refers to the relationship where an operation is performed N times for each of N items.

    Answer

    squared

  8. 8
    The relationship of input size to the number of steps an algorithm takes to run is characterized by its computational
    _____
    .
    Hint

    This term describes how much time or space an algorithm requires to run as a function of its input size.

    Answer

    complexity

  9. 9
    Computer Scientists use 'Big
    _____
    Notation' to describe the order of growth of an algorithm's running time.
    Hint

    This mathematical notation describes the limiting behavior of a function when the argument tends towards a particular value or infinity.

    Answer

    O

  10. 10
    For an array with 8 items, if Selection Sort has a complexity of N squared, the number of operations would be
    _____
    .
    Hint

    Perform the N squared calculation for N=8.

    Answer

    64

  11. 11
    If an array's size increases from 8 items to 80 items, the running time of Selection Sort increases by a factor of
    _____
    .
    Hint

    Compare the N squared values for N=8 and N=80. (802/82)(80^2 / 8^2)(802/82)

    Answer

    100

  12. 12
    The
    _____
    Sort algorithm works by repeatedly splitting an array into halves until individual items are reached, then merging them back in sorted order.
    Hint

    This algorithm's name reflects its two main operations: dividing and combining.

    Answer

    Merge

  13. 13
    The first step of Merge Sort is to check if the size of the array is greater than
    _____
    , and if so, split it into two halves.
    Hint

    Consider the base case for when splitting should stop in a recursive sorting algorithm.

    Answer

    1

  14. 14
    When merging two sorted arrays in Merge Sort, the algorithm compares the first numbers in each array and takes the
    _____
    one first.
    Hint

    To maintain sorted order, you always pick the smallest available element from the two sub-arrays.

    Answer

    lowest

  15. 15
    The computational complexity of Merge Sort is N times the
    _____
    of N.
    Hint

    This part of the complexity comes from the repeated splitting of the array.

    Answer

    Log

  16. 16
    For an array of 8 items, Merge Sort requires
    _____
    splits, as Log base 2 of 8 equals this number.
    Hint

    Calculate log⁡28\log_2 8log2​8.

    Answer

    3

  17. 17
    If an array size doubles from 8 to 16, the number of split steps in Merge Sort increases by only
    _____
    .
    Hint

    Compare log⁡28\log_2 8log2​8 and log⁡216\log_2 16log2​16.

    Answer

    1

  18. 18
    A
    _____
    is a network of nodes connected by lines, often used to represent maps with cities and roads.
    Hint

    This mathematical structure consists of vertices (nodes) and edges (lines).

    Answer

    graph

  19. 19
    In a graph, each line connecting nodes can be labeled with a
    _____
    or weight, representing factors like travel time.
    Hint

    This value indicates the 'expense' or 'distance' associated with traversing an edge.

    Answer

    cost

  20. 20
    Trying every single possible path exhaustively to find the fastest route in a graph is an example of a
    _____
    force approach.
    Hint

    This type of approach involves systematically checking all possible solutions to find the correct one.

    Answer

    brute

  21. 21
    A brute force approach to sorting, by trying every permutation, would have an N
    _____
    complexity.
    Hint

    This mathematical operation involves multiplying a number by every positive integer less than it.

    Answer

    factorial

  22. 22
    The classic algorithmic solution for finding the shortest path in a graph was invented by Edsger Dijkstra and is named
    _____
    algorithm.
    Hint

    This algorithm efficiently finds the shortest paths between nodes in a graph, especially with non-negative edge weights.

    Answer

    Dijkstra's

  23. 23
    Dijkstra's algorithm always starts with the node that has the
    _____
    cost.
    Hint

    This ensures the algorithm systematically expands from the most promising paths.

    Answer

    lowest

  24. 24
    Dijkstra's original algorithm had a complexity of the number of nodes in the graph
    _____
    .
    Hint

    Similar to Selection Sort, the initial version of this algorithm showed this growth pattern.

    Answer

    squared

  25. 25
    An improved version of Dijkstra's algorithm has a complexity of the number of nodes times the log of the number of nodes, PLUS the number of
    _____
    .
    Hint

    These represent the connections between nodes in the graph.

    Answer

    lines

1 of 25
Question 1 of 25

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent