Start learning →

AP (Advanced Placement) Data Structures and Algorithms — practice questions

Explore 50 free Data Structures and Algorithms questions in AP (Advanced Placement) Computer Science. Open each question or exercise to read its content, reference answers and available explanation.

Practise Data Structures and Algorithms with Quill →

Data Structures and Algorithms questions and exercises with answers

Showing questions 1–30 of 50.

A student writes out a sequence of precise instructions that operate on data. That sequence is an:Read the answer and worked solution →A list keeps its elements sitting next to each other in memory. That structure is an:Read the answer and worked solution →Array lists and linked lists both arrange elements one after another. That makes them:Read the answer and worked solution →Another structure arranges data in a hierarchy, with parents above children. That structure is a:Read the answer and worked solution →In a tree or a graph, a single element is represented by a:Read the answer and worked solution →A social network is modelled with people as vertices and friendships joining them. Each friendship is an:Read the answer and worked solution →A programmer names the two best known canonical searching algorithms. They are binary search and:Read the answer and worked solution →To run a binary search over place names, the data must first be stored in a list that is:Read the answer and worked solution →A computer scientist describes how the running time of an algorithm grows with input size. The notation used is:Read the answer and worked solution →One order of growth turns up constantly in algorithm analysis and is written O(log N). It is called:Read the answer and worked solution →Besides running time, scientists measure how much memory an algorithm needs as the problem grows. That is:Read the answer and worked solution →An algorithm solves a big problem by splitting the input into smaller instances of the same problem. That idea is:Read the answer and worked solution →Binary search can be read as an example of a wider family of algorithms that split and solve. That family is:Read the answer and worked solution →One canonical divide and conquer algorithm for comparison sorting splits a list and merges the halves. It is:Read the answer and worked solution →Another sorting algorithm partitions data around a chosen element and recurses on each side. That element is the:Read the answer and worked solution →Mapping each object to an integer so that different objects get different integers is the problem of:Read the answer and worked solution →A structure stores and retrieves elements in an array indexed by hash value. That structure is a:Read the answer and worked solution →Instead of narrowing down a sorted list by comparisons, hashing can index an element directly in:Read the answer and worked solution →A collection where every element carries an associated priority value is a:Read the answer and worked solution →In a heap, the element that can always be reached most efficiently sits at the:Read the answer and worked solution →A tree that uses ordering properties of the data to keep elements in a searchable hierarchy is a:Read the answer and worked solution →A well-known algorithm that showcases design principles useful across many problems is called:Read the answer and worked solution →Catch the data structuresRead the answer and worked solution →Pop the algorithmsRead the answer and worked solution →Run the algorithm gatesRead the answer and worked solution →Slice the algorithm wordsRead the answer and worked solution →Linear or branchingRead the answer and worked solution →Sort the computing wordsRead the answer and worked solution →Type the numberRead the answer and worked solution →Algorithms bingoRead the answer and worked solution →

Worked practice questions

A student writes out a sequence of precise instructions that operate on data. That sequence is an:

  1. Algorithm
  2. Anomaly
  3. Analogy
  4. Alphabet
Show answer and solution

Correct answer: A. Algorithm

1. The instructions are precise. 2. They act on data. 3. It is an algorithm. _Source: OpenStax Introduction to Computer Science, Chapter 3, Data Structures and Algorithms._

Open this question →

A list keeps its elements sitting next to each other in memory. That structure is an:

  1. Ordered graph
  2. Array list
  3. Empty stack
  4. Open circuit
Show answer and solution

Correct answer: B. Array list

1. Neighbouring memory is the clue. 2. Elements sit side by side. 3. It is an array list. _Source: OpenStax Introduction to Computer Science, Chapter 3, Data Structures and Algorithms._

Open this question →

Array lists and linked lists both arrange elements one after another. That makes them:

  1. Linear structures
  2. Random structures
  3. Circular structures
  4. Recursive structures
Show answer and solution

Correct answer: A. Linear structures

1. The elements form a line. 2. Order runs front to back. 3. They are linear data structures. _Source: OpenStax Introduction to Computer Science, Chapter 3, Data Structures and Algorithms._

Open this question →

How to practise

  1. Choose a Data Structures and Algorithms question and try to work out your answer.
  2. Open the question to check the correct answer and read its worked solution.
  3. Continue in the app for bite-sized lessons, explanations and review with Quill. You can start without creating an account.

Put it into practice

Continue with Data Structures and Algorithms practice for AP (Advanced Placement). Read explanations as you go. No signup form needed to start.

Practise Data Structures and Algorithms →

More Computer Science topics