Data Structures Flashcards
What is a linked list?
A data structure that represents a sequence of nodes.
What is a singly linked list?
Each node in a singly linked list points to the next node in the linked list.
What is a doubly linked list?
Each node points to both the next node and the previous node.
What is a data structure?
A set of variables that an algorithm uses to solve a problem. Can be as simple as an int variable or an array of strings, or super complex like with graphs, etc.
Choosing the right data structure can make algorithms more efficient.
Abstract Data Type (ADT)
A coordinated group of data structures + algorithms + interface functions used to solve a particular problem. Data structures and algorithms are a secret in ADT. It provides an interface to enable the rest of the program to use the ADT.
A program is build from a collection of ADTs, each solving a different sub-problem.
“Interface” functions
A simple set of functions that hide the complexity of the data structures and algorithms in an ADT.