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