1/51
Practice vocabulary flashcards defining fundamental concepts of data structures (queues, linked lists, trees) and algorithms (searching, sorting, and complexity analysis).
Algorithm
A sequence of finite steps, rules, or instructions to be followed in calculations or other problem-solving operations to solve a particular problem.
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.
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.
Space Complexity
The total memory required by an algorithm to execute and generate results, calculated as S(P)=C+SP(I), where C is the fixed part and SP(I) is the variable part depending on instance characteristics.
Time Complexity
The total amount of time required by an algorithm to complete execution, calculated as T(P)=C+TP(I), where C represents the constant time instructions and TP(I) represents variable time instructions (such as loops or recursion).
Brute Force Algorithm
The simplest and initial approach to a problem that directly checks all possible candidates to find a solution without optimization.
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.
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.
Dynamic Programming Algorithm
An algorithm approach that avoids repetitive calculation by storing the solutions of overlapping subproblems to solve larger instances of the problem.
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.
Data Item
A single unit of value in a data set or data structure.
Group Items
Data items that can be divided into subordinate data items (for example, a name subdivided into first, middle, and last names).
Elementary Items
Data items that cannot be divided into sub-items (for example, an employee ID).
Record
A collection of related data items representing different attributes of a single entity.
File
A collection of related records representing entities of the same type.
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.
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.
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.
FIFO Principle
The First In First Out rule governing queues where the first element inserted is the first element to be removed.
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.
Circular Queue
A specialized queue structure where the last position is connected back to the first position, operating in FIFO order.
Priority Queue
A specialized queue where elements are accessed and dequeued based on an assigned priority value rather than solely by insertion order.
Enqueue
The queue operation that adds or stores an element at the rear (end) of the queue.
Dequeue (Queue Operation)
The queue operation that accesses and removes the first element from the front (head) of the queue.
Linked List
A linear data structure whose elements (nodes) do not reside in consecutive memory regions but are connected using links or pointers.
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.
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.
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.
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.
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.
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) time.
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)) time.
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.
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.
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.
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)) time.
Tree Data Structure
A non-linear, hierarchical data structure composed of nodes connected by links/edges, where a tree with N nodes has a maximum of N−1 edges.
Root Node
The originating first node of a tree data structure; every tree possesses exactly one root node, and its depth is 0.
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.
Internal Node
Any node in a tree data structure that has at least one child; also referred to as a Non-Terminal Node.
Degree of a Node
The total number of children belonging to a specific node in a tree data structure.
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.
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.
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.
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.
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 2level nodes at each level.
Extended Binary Tree
A full binary tree obtained by adding dummy nodes to an existing binary tree wherever necessary.
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.
In-Order Traversal
A binary tree traversal method that visits nodes recursively in the sequence: Left Child → Root Node → Right Child.
Pre-Order Traversal
A binary tree traversal method that visits nodes recursively in the sequence: Root Node → Left Child → Right Child.
Post-Order Traversal
A binary tree traversal method that visits nodes recursively in the sequence: Left Child → Right Child → Root Node.
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).