Algorithms
Practice Algorithms MCQs for Pakistan exams (CSS, FPSC, PPSC, NTS) — 102 practice questions with answers and explanations.
How to use these questions
Algorithms on MCQsHub is 52 published questions for Pakistan exams such as CSS, FPSC, PPSC, and NTS. Open a question, choose an option, then read the explanation before you move on. The explanation names the correct choice and why the other options do not fit. Difficulty labels and topic tags show which idea to revise next, instead of repeating questions you already know.
Previous and next links on each question page stay inside Algorithms, so you can work through the subject without returning to this index. Subtopics listed here belong to the same subject and narrow the set. When you want a clock and a score, start a timed quiz for Algorithms. When you want a whole sitting rather than one question, open the past-paper library. New Algorithms questions appear here after editorial review.
The list below starts with the newest Algorithms questions. Later pages keep the same subject. Each title is a link to the full stem, the options, and the explanation.
1 2 3 Next All questions Full list of questions in this category for browsing.
Which concept is defined as follows: a search algorithm that checks each element in a list sequentially until... What is Linear search primarily used for? The following statement describes a specific concept. What is it called? a measure of the amount of memory an... Select the accurate description of Space complexity. Which term refers to an algorithm that computes shortest paths from a single source vertex in a graph, even wi... What does Bellman-Ford algorithm refer to? What is the name for a greedy algorithm that finds a minimum spanning tree for a connected, weighted graph by... Which of the following best describes Kruskal's algorithm? Identify the correct concept described as: an ordering of vertices in a directed acyclic graph such that for e... Topological sort is best defined as which of the following? A method of analyzing algorithms that determines the average time or space cost over a sequence of operations.... Choose the correct description of Amortized analysis. Which of the following best names the concept in which an optimization technique that stores the results of ex... What is the function or purpose of Memoization? The concept in which a property of a sorting algorithm where elements with equal keys retain their original re... Identify the correct definition of Sorting stability. What term describes the following? a straightforward problem-solving approach that tries all possible solution... In computer science, Brute-force algorithm refers to which of the following? Select the correct name for: an algorithm that uses a degree of randomness as part of its logic to achieve goo... The concept in which a sorting algorithm that builds the final sorted array one element at a time by inserting... Identify the correct definition of Insertion sort. What term describes the following? a sorting algorithm that repeatedly selects the smallest remaining element... In computer science, Selection sort refers to which of the following? Select the correct name for: a comparison-based sorting algorithm that uses a binary heap data structure to so... Which statement correctly explains Heap sort? Which term refers to a search algorithm that repeatedly divides a sorted array in half to locate a target valu... What does Binary search refer to? What is the name for a simple sorting algorithm that repeatedly swaps adjacent elements if they are in the wro... Which of the following best describes Bubble sort? Identify the correct concept described as: a divide-and-conquer sorting algorithm that splits the array, sorts... Merge sort is best defined as which of the following? A divide-and-conquer sorting algorithm that partitions elements around a pivot value. What is this concept cal... Choose the correct description of Quick sort. Which of the following best names the concept in which an algorithmic technique that solves problems by breaki... What is the function or purpose of Dynamic programming? The concept in which an algorithmic approach that makes the locally optimal choice at each step, hoping to fin... Identify the correct definition of Greedy algorithm. What term describes the following? a mathematical notation used to describe the upper bound of an algorithm's... In computer science, Big O notation refers to which of the following? Select the correct name for: a graph traversal algorithm that explores as far as possible along each branch be... Which statement correctly explains Depth-first search (DFS)? Which concept is defined as follows: a graph traversal algorithm that explores all neighbors at the current de... What is Breadth-first search (BFS) primarily used for? The following statement describes a specific concept. What is it called? an algorithm that finds the shortest... Select the accurate description of Dijkstra's algorithm. Which term refers to an algorithm design paradigm that breaks a problem into smaller subproblems, solves them,... What does Divide and conquer refer to? What is the name for an algorithmic technique that incrementally builds candidates and abandons ones that fail... Which of the following best describes Backtracking? Identify the correct concept described as: a measure of the amount of time an algorithm takes to run as a func... What is the worst-case time complexity of Binary Search? Which sorting algorithm has the best average-case time complexity among the following?