Flashcards on Data Structures

Click on the flashcard to see the answer


What is a data structure?

A data structure is a specific way of organizing data in a computer so that it can be used efficiently.

What are the types of data structures?

The types of data structures are arrays, linked lists, stacks, queues, trees, graphs, and hash tables.

What is the difference between an array and a linked list?

An array stores elements of the same type in contiguous memory locations, whereas a linked list stores elements in non-contiguous memory locations connected using pointers.

What is a stack?

A stack is a data structure in which elements are added and removed from the top only. The last item added is always the first item removed.

What is a queue?

A queue is a data structure in which elements are added at the back and removed from the front. The first item added is always the first item removed.

What is a tree?

A tree is a data structure that consists of nodes connected by edges. It has a root node, branches, and leaves.

What is a binary tree?

A binary tree is a tree in which each node has at most two children, referred to as the left child and the right child.

What is a graph?

A graph is a data structure that consists of vertices (or nodes) and edges connecting them.

What is a hash table?

A hash table is a data structure that stores key-value pairs in an array using a hash function to determine the index of the array where the key-value pair should be stored.

What is the purpose of a data structure?

The purpose of a data structure is to organize data in a way that enables efficient data access and manipulation.

What is the time complexity of searching in a hash table?

The time complexity of searching in a hash table is O(1) on average, but can be up to O(n) in the worst case scenario.

What is a priority queue?

A priority queue is a data structure that stores elements with assigned priorities and retrieves them in order of priority.

What is dynamic programming?

Dynamic programming is a technique in computer programming where subproblems are solved and their solutions are stored in memory to be used later.

What is recursion?

Recursion is a programming technique where a function calls itself to solve a problem.

What is a heap?

A heap is a specialized tree-based data structure that satisfies the heap property where the parent node is less than or equal to its children nodes. It is commonly used to implement priority queues.

What is a data structure?

A data structure is a specific way of organizing data in a computer so that it can be used efficiently.

What are the types of data structures?

The types of data structures are arrays, linked lists, stacks, queues, trees, graphs, and hash tables.

What is the difference between an array and a linked list?

An array stores elements of the same type in contiguous memory locations, whereas a linked list stores elements in non-contiguous memory locations connected using pointers.

What is a stack?

A stack is a data structure in which elements are added and removed from the top only. The last item added is always the first item removed.

What is a queue?

A queue is a data structure in which elements are added at the back and removed from the front. The first item added is always the first item removed.

What is a tree?

A tree is a data structure that consists of nodes connected by edges. It has a root node, branches, and leaves.

What is a binary tree?

A binary tree is a tree in which each node has at most two children, referred to as the left child and the right child.

What is a graph?

A graph is a data structure that consists of vertices (or nodes) and edges connecting them.

What is a hash table?

A hash table is a data structure that stores key-value pairs in an array using a hash function to determine the index of the array where the key-value pair should be stored.

What is the purpose of a data structure?

The purpose of a data structure is to organize data in a way that enables efficient data access and manipulation.

What is the time complexity of searching in a hash table?

The time complexity of searching in a hash table is O(1) on average, but can be up to O(n) in the worst case scenario.

What is a priority queue?

A priority queue is a data structure that stores elements with assigned priorities and retrieves them in order of priority.

What is dynamic programming?

Dynamic programming is a technique in computer programming where subproblems are solved and their solutions are stored in memory to be used later.

What is recursion?

Recursion is a programming technique where a function calls itself to solve a problem.

What is a heap?

A heap is a specialized tree-based data structure that satisfies the heap property where the parent node is less than or equal to its children nodes. It is commonly used to implement priority queues.

Share


Login to Save


Share



Login to Save


Explore Other Decks


Made for Grade 7

Information Technology: Objects in Electronic Spreadsheets


View Deck
Made for Grade 8

The French Revolution


View Deck
Made for Grade 8

Thinking Outside the Box


View Deck

Explore More