ThatQuiz Test Library Take this test now
Algorithms
Contributed by: Skelton
  • 1. Algorithms are step-by-step procedures or formulas for solving problems. They are a set of instructions that describe how to perform a task or solve a problem effectively. Algorithms are used in various fields such as computer science, mathematics, engineering, and more. They help in organizing data, making decisions, and automating processes. By designing efficient algorithms, we can optimize the use of resources, improve performance, and solve complex problems in a systematic way.

    Which sorting algorithm has a worst-case time complexity of O(n2)?
A) Bubble Sort
B) Quick Sort
C) Heap Sort
D) Merge Sort
  • 2. What data structure is typically used in a Depth-First Search (DFS) algorithm?
A) Queue
B) Stack
C) Array
D) Binary Tree
  • 3. Which algorithm is commonly used to find the shortest path in a graph with non-negative edge weights?
A) Prim's algorithm
B) Bellman-Ford algorithm
C) Dijkstra's algorithm
D) A* search algorithm
  • 4. What does the 'recursion' mean in the context of algorithms?
A) A function that generates random numbers.
B) A function that iterates over a collection of elements.
C) A function that has no return statement.
D) A function that calls itself in a problem-solving process.
  • 5. Which algorithm is used to find the transitive closure of a directed graph?
A) Tarjan's algorithm
B) Warshall's algorithm
C) Floyd's algorithm
D) Kosaraju's algorithm
  • 6. What is the term for the measure of how detailed the instructions are in an algorithm?
A) Scalability
B) Complexity
C) Efficiency
D) Granularity
  • 7. Which of the following is a divide and conquer algorithm?
A) Merge Sort
B) Selection Sort
C) Insertion Sort
D) Bubble Sort
  • 8. What is the process of making a repetitive sequence shorter by using previous occurrences called?
A) Differential Encoding
B) Burrows-Wheeler Transform
C) Huffman Coding
D) Run-Length Encoding
  • 9. What data structure is typically used in a Breadth-First Search algorithm?
A) Heap
B) Stack
C) Linked List
D) Queue
  • 10. Which algorithm can be used to find the maximum flow in a flow network?
A) Depth-First Search
B) Ford-Fulkerson algorithm
C) Binary Search algorithm
D) Bubble Sort
  • 11. What is the worst-case time complexity of the Quick Sort algorithm?
A) O(n)
B) O(log n)
C) O(n2)
D) O(n log n)
  • 12. What is the main advantage of the breadth-first search (BFS) algorithm over depth-first search (DFS)?
A) DFS finds the path more quickly.
B) DFS uses less memory space.
C) BFS guarantees the shortest path to the goal.
D) BFS is easier to implement.
  • 13. What is the primary goal of the Floyd-Warshall algorithm?
A) To calculate the maximum flow in a flow network.
B) To find the shortest paths between all pairs of vertices in a weighted graph.
C) To sort elements in ascending order.
D) To determine the largest connected component in an undirected graph.
  • 14. Which algorithm is used to find the longest common subsequence between two sequences?
A) Selection Sort
B) Radix Sort
C) Heap Sort
D) Longest Common Subsequence algorithm
  • 15. Who was the Persian scientist and polymath who wrote about algorithms in 825 AD?
A) Adelard of Bath
B) Muḥammad ibn Mūsā al-Khwārizmī
C) John of Seville
D) Geoffrey Chaucer
  • 16. What is the Latinized form of Al-Khwarizmi's name used in early translations?
A) Algorism
B) algoritmi
C) augrym
D) arithmos
  • 17. Which text by al-Khwārizmī is known as 'Book of Indian computation'?
A) Liber Algoritmi de numero Indorum
B) The Canterbury Tales
C) Liber Alghoarismi de practica arismetrice
D) kitāb al-ḥisāb al-hindī
  • 18. In what context are social media recommender systems often mistakenly called 'algorithms'?
A) They provide well-defined correct results for all users.
B) They rely on heuristics, not true algorithms.
C) They are based on finite sequences of instructions.
D) They use deterministic processes to generate recommendations.
  • 19. What is the role of conditionals in advanced algorithms?
A) They prevent automated reasoning.
B) They eliminate randomness from the algorithm.
C) They divert code execution through various routes.
D) They ensure that the algorithm always terminates.
  • 20. What does 'automated reasoning' refer to in the context of algorithms?
A) Following a fixed sequence of operations.
B) Generating random outputs without input.
C) Using heuristics to solve problems.
D) Deducing valid inferences through code execution.
  • 21. What is the significance of 'augrym stones' mentioned by Geoffrey Chaucer?
A) They were a form of algorithmic programming.
B) They were used for place-value calculation.
C) They represented heuristic methods.
D) They were early computers.
  • 22. In which ancient civilization were the earliest division algorithms recorded?
A) Greek mathematics
B) Egyptian mathematics
C) Chinese mathematics
D) Babylonian mathematics
  • 23. Which dynasty is associated with Babylonian clay tablets describing algorithms for computing formulas?
A) Assyrian dynasty
B) Akkadian dynasty
C) Neo-Babylonian dynasty
D) Hammurabi dynasty
  • 24. The Rhind Mathematical Papyrus is associated with which ancient civilization?
A) Egyptian mathematics
B) Indian mathematics
C) Greek mathematics
D) Babylonian mathematics
  • 25. Who developed the first cryptographic algorithm for deciphering encrypted code?
A) Muḥammad ibn Mūsā al-Khwārizmī
B) Euclid
C) Nicomachus
D) Al-Kindi
  • 26. Which algorithm design pattern involves defining a skeleton of an algorithm in a method?
A) Divide-and-conquer
B) Dynamic programming
C) Decorator pattern
D) Template method pattern
  • 27. Which invention was used worldwide by the mid-19th century?
A) Telegraph
B) Television
C) Telephone
D) Radio
  • 28. The Euclidean algorithm was first described in which ancient text?
A) Euclid's Elements
B) Introduction to Arithmetic by Nicomachus
C) Algebra by Al-Khwarizmi
D) Sulba Sutras
  • 29. Which invention led to the development of punch cards?
A) Telegraph
B) Jacquard loom
C) Analytical engine
D) Telephone-switching network
  • 30. What mechanism was key to the invention of weight-driven clocks in the Middle Ages?
A) Quartz oscillator
B) Balance wheel mechanism
C) Pendulum mechanism
D) Verge escapement mechanism
  • 31. Which problem-solving technique involves invoking itself repeatedly?
A) Serial execution
B) Parallel processing
C) Recursion
D) Iteration
  • 32. Which type of programming involves finding optimal solutions to a linear function with constraints?
A) Heuristic method
B) Linear programming
C) Dynamic programming
D) Greedy method
  • 33. Which approach involves building multiple solutions incrementally and abandoning them if they cannot lead to a valid full solution?
A) Divide and conquer
B) Backtracking
C) Brute-force or exhaustive search
D) Reduction of complexity
  • 34. Who invented the digital adding device in 1937?
A) Alan Turing
B) Konrad Zuse
C) George Stibitz
D) John von Neumann
  • 35. What is a common application of greedy algorithms in graph theory?
A) Simulating annealing processes.
B) Finding minimal spanning trees.
C) Optimizing linear functions with constraints.
D) Solving integer programming problems.
  • 36. Who began attempts to solve David Hilbert's Entscheidungsproblem in 1928?
A) Emil Post
B) Alonzo Church
C) Alan Turing
D) David Hilbert
  • 37. Which of the following is not a structured expression of algorithms that avoids common ambiguities of natural language?
A) Flowcharts
B) Pseudocode
C) Drakon-charts
D) Natural languages
  • 38. Who is credited with designing the first algorithm intended for a computer?
A) George Stibitz
B) Herman Hollerith
C) Ada Lovelace
D) Charles Babbage
  • 39. What is the subclass of Monte Carlo algorithms that runs in polynomial time?
A) ZPP
B) P
C) RP
D) NP
  • 40. What primary symbol in a flowchart represents decisions?
A) Dots
B) Rectangles
C) Diamonds
D) Arrows
  • 41. Which representation gives the exact state table and list of transitions for a Turing machine?
A) Control tables
B) High-level description
C) Formal description
D) Implementation description
  • 42. What method did Al-Kindi describe for cryptanalysis?
A) Frequency analysis
B) Caesar cipher
C) Transposition cipher
D) Substitution cipher
  • 43. What did NIST update in 2024 related to quantum computing?
A) Post-quantum encryption standards
B) SAINT program
C) Lambda calculus
D) Turing machines
  • 44. Which of these is NOT a canonical structure augmented by Tausworthe?
A) RECURSION
B) SEQUENCE
C) WHILE-DO
D) IF-THEN-ELSE
  • 45. Which library integrated the small sorting algorithms discovered by AlphaDev?
A) Java Collections Framework
B) Python's built-in sort function
C) LLVM standard C++ sorting library
D) C# System.Linq
  • 46. What does AlphaEvolve use to propose code changes?
A) Language models
B) Automated evaluators
C) Human coders
D) Reinforcement learning
  • 47. In flowchart representation, what does an arrow symbolize?
A) Sub-structure nesting
B) Decision point
C) Output
D) Program flow
  • 48. In what year was AlphaDev introduced by Google DeepMind?
A) 2020
B) 2023
C) 2025
D) 2019
  • 49. What does pseudocode typically represent in algorithm analysis?
A) A simple and general representation
B) A graphical aid like a flowchart
C) A detailed implementation guide
D) An optimized code for specific hardware
  • 50. Which heuristic algorithm is non-deterministic?
A) Simulated annealing
B) Prim's algorithm
C) Floyd–Warshall algorithm
D) Tabu search
  • 51. Which type of algorithms are inherently serial and cannot be parallelized?
A) Distributed algorithms
B) Inherently serial problems
C) Parallelizable algorithms
D) Non-deterministic algorithms
  • 52. Which AI system discovered improved sorting and hashing algorithms?
A) DeepMind
B) AlphaDev
C) AlphaEvolve
D) AlphaZero
  • 53. Which device is considered the first real Turing-complete computer?
A) ENIAC
B) Difference Engine
C) Z3
D) Babbage's analytical engine
  • 54. Which search algorithm is more efficient for sorted lists in terms of time complexity?
A) Sequential search
B) Linear search
C) Binary search
D) Bubble sort
  • 55. What is the open question known as that involves whether randomized algorithms with polynomial time complexity can be the fastest for some problems?
A) P versus NP problem
B) Reduction of complexity problem
C) Las Vegas problem
D) Monte Carlo problem
  • 56. Which design approach involves breaking a problem into smaller sub-problems?
A) Divide-and-conquer
B) Dynamic programming
C) Decorator pattern
D) Template method pattern
  • 57. What was a significant development in data storage and transmission around 1890?
A) Floppy disks
B) Punch cards
C) Magnetic tape
D) Hard drives
  • 58. Which formalization is associated with Alonzo Church and was introduced in 1936?
A) Formulation 1
B) Lambda calculus
C) Recursive functions
D) Turing machines
  • 59. Which AI development has inverted the traditional sequence of algorithm evolution from heuristics to formal algorithms?
A) Transformer-based AI
B) NIST encryption standards
C) SAINT program
D) Quantum computing
  • 60. Which invention in 1835 led to the development of telephone-switching networks?
A) Telegraph
B) Electromechanical relays
C) Difference engine
D) Punch cards
  • 61. What type of problems can be solved using the greedy method for minimal spanning trees?
A) Graphs without negative cycles.
B) Dynamic programming problems.
C) Problems with integer constraints.
D) Linear programming problems.
  • 62. What was the primary use of ticker tape developed in the 1870s?
A) Text messaging
B) Audio recording
C) Data transmission
D) Image printing
  • 63. Which century saw the use of accurate automatic machines leading to mechanical automata?
A) 13th century
B) 17th century
C) 19th century
D) 15th century
Created with That Quiz — the site for test creation and grading in math and other subjects.