Flashcards on Data Structures

Click on the flashcard to see the answer


What is a data structure?

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

What are the common types of data structures?

Common types of data structures include arrays, linked lists, stacks, queues, trees, and graphs.

What is an array?

An array is a data structure that stores a fixed-size sequential collection of elements of the same type.

What is a linked list?

A linked list is a data structure in which objects are arranged in a linear order. Each object is a separate element containing a pointer/reference to the next element.

What is a stack?

A stack is a data structure that follows the Last-In-First-Out (LIFO) principle, where the last element inserted is the first one to be removed.

What is a queue?

A queue is a data structure that follows the First-In-First-Out (FIFO) principle, where the first element inserted is the first one to be removed.

What are trees in data structures?

In data structures, a tree is a widely used abstract data type that simulates a hierarchical tree structure.

What is a binary search tree?

A binary search tree is a type of tree where each node has at most two children, and the left child is smaller than the parent while the right child is larger.

What is a graph?

A graph is a data structure that consists of a set of vertices (nodes) and a set of edges that connect the vertices.

What is a hash table?

A hash table, also known as a hash map, is a data structure that implements an associative array abstract data type.

What is the time complexity of searching in a binary search tree?

The time complexity of searching in a binary search tree is O(log n) for a balanced tree, where n is the number of nodes.

What is the worst-case time complexity for searching in a linked list?

The worst-case time complexity for searching in a linked list is O(n), where n is the number of elements in the list.

What is the difference between a stack and a queue?

The main difference between a stack and a queue is the order in which elements are inserted and removed. A stack follows the LIFO principle, while a queue follows the FIFO principle.

What are dynamic data structures?

Dynamic data structures are data structures that can grow or shrink in size during program execution.

What are the advantages of using arrays?

Some advantages of using arrays include constant time access to elements, efficient memory utilization, and ease of implementation.

What is the time complexity of inserting an element in a sorted array?

The time complexity of inserting an element in a sorted array is O(n), where n is the number of elements in the array, as shifting may be required to accommodate the new element.

What is a data structure?

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

What are the common types of data structures?

Common types of data structures include arrays, linked lists, stacks, queues, trees, and graphs.

What is an array?

An array is a data structure that stores a fixed-size sequential collection of elements of the same type.

What is a linked list?

A linked list is a data structure in which objects are arranged in a linear order. Each object is a separate element containing a pointer/reference to the next element.

What is a stack?

A stack is a data structure that follows the Last-In-First-Out (LIFO) principle, where the last element inserted is the first one to be removed.

What is a queue?

A queue is a data structure that follows the First-In-First-Out (FIFO) principle, where the first element inserted is the first one to be removed.

What are trees in data structures?

In data structures, a tree is a widely used abstract data type that simulates a hierarchical tree structure.

What is a binary search tree?

A binary search tree is a type of tree where each node has at most two children, and the left child is smaller than the parent while the right child is larger.

What is a graph?

A graph is a data structure that consists of a set of vertices (nodes) and a set of edges that connect the vertices.

What is a hash table?

A hash table, also known as a hash map, is a data structure that implements an associative array abstract data type.

What is the time complexity of searching in a binary search tree?

The time complexity of searching in a binary search tree is O(log n) for a balanced tree, where n is the number of nodes.

What is the worst-case time complexity for searching in a linked list?

The worst-case time complexity for searching in a linked list is O(n), where n is the number of elements in the list.

What is the difference between a stack and a queue?

The main difference between a stack and a queue is the order in which elements are inserted and removed. A stack follows the LIFO principle, while a queue follows the FIFO principle.

What are dynamic data structures?

Dynamic data structures are data structures that can grow or shrink in size during program execution.

What are the advantages of using arrays?

Some advantages of using arrays include constant time access to elements, efficient memory utilization, and ease of implementation.

What is the time complexity of inserting an element in a sorted array?

The time complexity of inserting an element in a sorted array is O(n), where n is the number of elements in the array, as shifting may be required to accommodate the new element.

Share


Login to Save


Share



Login to Save


Explore Other Decks


Made for Grade 10

Control and Coordination in Animals


View Deck
Made for Grade 10

Food Webs


View Deck
Made for Grade 10

Food Chain


View Deck

Explore More