Prep Guide Flashcards
What is a data structure?
A data structure is a way of organizing and storing data in a computer so that it can be accessed and modified efficiently.
What is an algorithm?
An algorithm is a step-by-step procedure or formula for solving a problem or accomplishing some end.
What is the difference between an array and a linked list?
An array stores elements of the same type in contiguous memory locations, while a linked list stores elements in nodes that are not necessarily adjacent in memory.
What is a stack?
A stack is a data structure that follows the Last In, First Out (LIFO) principle, where elements are inserted and removed from the same end.
What is a queue?
A queue is a data structure that follows the First In, First Out (FIFO) principle, where elements are inserted at the rear and removed from the front.
What is a binary search tree?
A binary search tree is a data structure that allows for efficient search, insertion, and deletion operations, where each node has at most two children.
What is a hash table?
A hash table is a data structure that stores key-value pairs, using a hash function to map keys to index locations for efficient retrieval.
What is a sorting algorithm?
A sorting algorithm is an algorithm that puts elements of a list in a certain order, such as numerical or lexicographical.
What is the time complexity of binary search?
The time complexity of binary search is O(log n), where n is the number of elements in the array.
What is the purpose of Big O notation?
Big O notation is used to describe the upper bound of the time or space complexity of an algorithm in terms of the input size.
What is recursion?
Recursion is a programming technique where a function calls itself in order to solve smaller instances of the same problem.
What is dynamic programming?
Dynamic programming is a method for solving complex problems by breaking them down into simpler subproblems and solving each subproblem only once.
What is an adjacency list?
An adjacency list is a way to represent a graph as a collection of linked lists, where each list represents the neighbors of a vertex.
What is a priority queue?
A priority queue is a data structure that allows for efficient retrieval of the highest (or lowest) priority element.
What is a trie?
A trie is a tree-like data structure used to store a dynamic set of strings, where each node represents a common prefix of the strings.