CSC301: Data Structures

0.0(0)
studied byStudied by 0 people
0.0(0)
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/27

flashcard set

Earn XP

Description and Tags

These flashcards cover key concepts from data structures, including definitions, classifications, and specific examples that will help reinforce understanding for the upcoming exam.

Last updated 9:56 AM on 2/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

28 Terms

1
New cards

What are the main considerations when choosing a data structure?

Short access time, ease of update, economy of storage, simple maintenance, and reliability.

2
New cards

Define data structure.

A logical or mathematical model that organizes data.

3
New cards

What is a primitive data structure?

Fundamental data types like integer, real, character, and Boolean.

4
New cards

What is a non-primitive data structure?

Data structures created using primitive data structures, such as arrays, linked lists, queues, stacks, trees, and graphs.

5
New cards

What is a linear data structure?

A data structure where elements are arranged in a sequence or linear list.

6
New cards

Give two examples of linear data structures.

Arrays and linked lists.

7
New cards

What defines a non-linear data structure?

Data items are not arranged in sequence; examples include trees and graphs.

8
New cards

What is a binary tree?

A tree data structure where each node has at most two children, referred to as the left and right subtrees.

9
New cards

Define a node in a binary tree.

An item of information in the tree that may link to other nodes.

10
New cards

Explain the term 'leaf' in context of trees.

A terminal node in a tree that has no children.

11
New cards

What is a stack?

A linear list that operates on a Last-In-First-Out (LIFO) principle.

12
New cards

What is a queue?

A linear list that operates on a First-In-First-Out (FIFO) principle.

13
New cards

How does a circular queue differ from a regular queue?

In a circular queue, the last position is connected back to the first position, thus treating the queue as circular.

14
New cards

What are some applications of a stack?

Function call management, expression evaluation, backtracking algorithms.

15
New cards

What is the use of recursion in data structures?

It is used in traversing data structures such as trees and graphs.

16
New cards

Define hash table in data structures.

A data structure that implements an associative array, where a hash function is used to compute an index into an array of buckets.

17
New cards

What is the complexity of inserting an element into a binary search tree on average?

O(log n) for balanced trees.

18
New cards

Describe an adjacency list representation of graphs.

A collection of lists for each vertex, where each list contains the nodes that are adjacent to it.

19
New cards

What is a directed graph?

A graph where edges have a direction, indicating how one node can reach another.

20
New cards

What is big-O notation?

A mathematical notation used to describe the upper bound of the complexity of an algorithm.

21
New cards

What is the purpose of linked lists?

To provide a flexible way to store collections of data, where elements can easily be inserted or removed.

22
New cards

Describe the difference between singly linked and doubly linked lists.

Singly linked lists contain nodes with one pointer to the next node, while doubly linked lists contain two pointers that reference both the next and previous nodes.

23
New cards

What is a tree traversal?

The process of visiting each node in a tree data structure in a specific order.

24
New cards

What are the three standard tree traversal methods?

Preorder, Inorder, and Postorder.

25
New cards

What is the significance of a primary key in databases?

It uniquely identifies each record in the database table.

26
New cards

Define an algorithm.

A step-by-step procedure for solving a problem or performing a task.

27
New cards

Explain what a record is in data structures.

A collection of related data fields that can be treated as a single unit.

28
New cards

Outline the difference between Static and Dynamic data structures.

Static data structures have a fixed size, while dynamic data structures can grow or shrink in size during program execution.

Explore top flashcards