Data Structures and Algorithms

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

1/51

flashcard set

Earn XP

Description and Tags

Practice vocabulary flashcards defining fundamental concepts of data structures (queues, linked lists, trees) and algorithms (searching, sorting, and complexity analysis).

52 Terms

1
New cards

Algorithm

A sequence of finite steps, rules, or instructions to be followed in calculations or other problem-solving operations to solve a particular problem.

2
New cards

Priori Analysis

Theoretical efficiency analysis conducted on an algorithm before its implementation, independent of hardware and compiler specifications, assuming external factors like processor speed remain constant.

3
New cards

Posterior Analysis

Empirical evaluation of an algorithm conducted after executing its actual implementation in a programming language on specific hardware to record real runtime, memory usage, and correctness.

4
New cards

Space Complexity

The total memory required by an algorithm to execute and generate results, calculated as S(P)=C+SP(I)S(P) = C + S_P(I), where CC is the fixed part and SP(I)S_P(I) is the variable part depending on instance characteristics.

5
New cards

Time Complexity

The total amount of time required by an algorithm to complete execution, calculated as T(P)=C+TP(I)T(P) = C + T_P(I), where CC represents the constant time instructions and TP(I)T_P(I) represents variable time instructions (such as loops or recursion).

6
New cards

Brute Force Algorithm

The simplest and initial approach to a problem that directly checks all possible candidates to find a solution without optimization.

7
New cards

Divide and Conquer Algorithm

An algorithm design paradigm that divides a problem into sub-problems, solves each sub-problem, and combines their solutions to obtain the final result.

8
New cards

Greedy Algorithm

An algorithm design paradigm where the solution is built piece by piece, selecting at each stage whichever choice yields the immediate greatest benefit.

9
New cards

Dynamic Programming Algorithm

An algorithm approach that avoids repetitive calculation by storing the solutions of overlapping subproblems to solve larger instances of the problem.

10
New cards

Backtracking Algorithm

A problem-solving strategy that builds candidate solutions incrementally and retraces steps back to the failure point upon encountering a dead end to explore alternative options.

11
New cards

Data Item

A single unit of value in a data set or data structure.

12
New cards

Group Items

Data items that can be divided into subordinate data items (for example, a name subdivided into first, middle, and last names).

13
New cards

Elementary Items

Data items that cannot be divided into sub-items (for example, an employee ID).

14
New cards

Record

A collection of related data items representing different attributes of a single entity.

15
New cards

File

A collection of related records representing entities of the same type.

16
New cards

Primitive Data Structures

Basic data structures comprising numbers and characters that are built into programming languages (such as Integer, Float, Character, and Boolean) and can be operated on directly by machine-level instructions.

17
New cards

Non-Primitive Data Structures

Complex data structures derived from primitive types that form homogeneous or heterogeneous collections of elements and cannot be manipulated directly by machine-level instructions.

18
New cards

Queue

A linear data structure open at both ends that operates on the First In First Out (FIFO) principle, where insertions occur at the rear and deletions occur at the front.

19
New cards

FIFO Principle

The First In First Out rule governing queues where the first element inserted is the first element to be removed.

20
New cards

Double-Ended Queue (Dequeue)

A queue variant where insertion and deletion operations can be performed from both ends, which can be further specialized into Input Restricted or Output Restricted queues.

21
New cards

Circular Queue

A specialized queue structure where the last position is connected back to the first position, operating in FIFO order.

22
New cards

Priority Queue

A specialized queue where elements are accessed and dequeued based on an assigned priority value rather than solely by insertion order.

23
New cards

Enqueue

The queue operation that adds or stores an element at the rear (end) of the queue.

24
New cards

Dequeue (Queue Operation)

The queue operation that accesses and removes the first element from the front (head) of the queue.

25
New cards

Linked List

A linear data structure whose elements (nodes) do not reside in consecutive memory regions but are connected using links or pointers.

26
New cards

Node (Linked List)

An individual constituent element of a linked list containing two parts: a data field and a reference link (pointer) pointing to the next node.

27
New cards

Singly Linked List

The most basic linked list (or 'one-way chain') wherein each node contains data and a single pointer pointing only forward to the subsequent node.

28
New cards

Doubly Linked List

A linked list (or 'two-way linked list') whose nodes each have three parts: a data field, a forward pointer to the next node, and a backward pointer to the previous node.

29
New cards

Circular Linked List

A linked list type where the terminal node points back to the initial node, creating a loop with no null pointer and no distinct starting or ending node.

30
New cards

Doubly Circular Linked List

A linked list structure combining circular and doubly linked properties where each node holds next and previous pointers, the first node points backward to the last, and the last points forward to the first, with no node containing null.

31
New cards

Linear Search

A sequential search algorithm that inspects each element of a collection one by one from the beginning until the target key is found or the collection terminates, operating in O(n)O(n) time.

32
New cards

Binary Search

A search algorithm applicable to sorted data structures with constant-time access that repeatedly halves the search space by comparing the target element with the middle index, operating in O(log⁡(n))O(\log(n)) time.

33
New cards

Bubble Sort

A sorting algorithm that compares adjacent elements and swaps them if they are out of order, causing the largest unsorted element to move to the end of the array in each iteration.

34
New cards

Selection Sort

A sorting algorithm that repeatedly identifies the smallest element from the unsorted portion of an array and swaps it into the beginning position of that unsorted subarray.

35
New cards

Quicksort

A divide-and-conquer sorting algorithm that selects a pivot element, partitions the array so smaller elements move to the left and larger elements to the right, and recursively sorts the resulting subarrays.

36
New cards

Merge Sort

A divide-and-conquer sorting algorithm that recursively splits an array into halves until subarrays of size 1 are reached, then merges the sorted subarrays back together in O(nlog⁡(n))O(n \log(n)) time.

37
New cards

Tree Data Structure

A non-linear, hierarchical data structure composed of nodes connected by links/edges, where a tree with NN nodes has a maximum of N−1N-1 edges.

38
New cards

Root Node

The originating first node of a tree data structure; every tree possesses exactly one root node, and its depth is 0.

39
New cards

Leaf Node

Any node in a tree data structure that does not have any children; also referred to as an External Node or Terminal Node.

40
New cards

Internal Node

Any node in a tree data structure that has at least one child; also referred to as a Non-Terminal Node.

41
New cards

Degree of a Node

The total number of children belonging to a specific node in a tree data structure.

42
New cards

Height of a Node

The total number of edges from a leaf node to that particular node along the longest path, with the height of every leaf node being 0.

43
New cards

Depth of a Node

The total number of edges from the root node to a particular node, where the depth of the root node is 0.

44
New cards

Binary Tree

A specialized tree data structure in which every node can have a maximum of two children, designated as the left child and the right child.

45
New cards

Strictly Binary Tree

A binary tree (also known as a Full Binary Tree, Proper Binary Tree, or 2-Tree) where every node has either zero or exactly two children.

46
New cards

Complete Binary Tree

A binary tree (also known as a Perfect Binary Tree) in which every internal node has exactly two children and all leaf nodes reside at the same level, containing 2level2^{\text{level}} nodes at each level.

47
New cards

Extended Binary Tree

A full binary tree obtained by adding dummy nodes to an existing binary tree wherever necessary.

48
New cards

Threaded Binary Tree

A binary tree proposed by A. J. Perlis and C. Thornton that replaces NULL pointers with references (threads) to a node's in-order predecessor or in-order successor.

49
New cards

In-Order Traversal

A binary tree traversal method that visits nodes recursively in the sequence: Left Child →\rightarrow Root Node →\rightarrow Right Child.

50
New cards

Pre-Order Traversal

A binary tree traversal method that visits nodes recursively in the sequence: Root Node →\rightarrow Left Child →\rightarrow Right Child.

51
New cards

Post-Order Traversal

A binary tree traversal method that visits nodes recursively in the sequence: Left Child →\rightarrow Right Child →\rightarrow Root Node.

52
New cards

Left Child - Right Sibling Representation

A tree representation method utilizing nodes with three fields: Data field (storing the element value), Left child reference field (storing the address of the left child), and Right sibling reference field (storing the address of the right sibling).