Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix: Glossary of Terms

Introduction

This glossary provides clear, beginner-friendly definitions for key terms used in the "Java Data Structures and Algorithms for Beginners" curriculum, with a focus on concepts from the Binary Search chapter and broader data structures and algorithms (DSA) topics. It serves as a reference to help students understand technical terminology encountered in problem statements, implementations, and complexity analyses. Terms are drawn from the Binary Search exercises, as well as other core data structures (arrays, linked lists, stacks, queues, hashing, trees, graphs), sorting algorithms (Bubble Sort, Selection Sort, Insertion Sort, Merge Sort), searching algorithms (Linear Search, Binary Search), and recursion. This glossary supports the learning platform’s goal of providing accessible, hands-on education with embedded compilers and visualizations.

Glossary of Terms

  • Algorithm: A step-by-step procedure or set of rules to solve a problem or perform a task, such as searching or sorting data. Example: Binary Search is an algorithm to find an element in a sorted array.
  • Array: A data structure that stores a fixed-size sequence of elements of the same type, accessed by index. Example: [1, 3, 5, 7] is an array used in Binary Search.
  • Big-O Notation: A mathematical notation to describe the upper bound of an algorithm’s time or space complexity, indicating its efficiency as input size grows. Example: Binary Search has O(log n) time complexity.
  • Binary Search: A divide-and-conquer algorithm that finds an element in a sorted array by repeatedly halving the search interval, comparing the middle element to the target. Example: Finding 7 in [1, 3, 5, 7, 9] by checking the middle element.
  • Complexity: A measure of an algorithm’s performance, typically in terms of time (execution duration) or space (memory usage). Example: Binary Search’s time complexity is logarithmic, O(log n).
  • Divide-and-Conquer: An algorithmic paradigm that breaks a problem into smaller subproblems, solves them, and combines results. Binary Search uses this by dividing the array in half.
  • Duplicate Handling: Techniques to manage repeated elements in a data structure, such as finding the first and last occurrences of a target in Binary Search. Example: Finding indices [1, 3] for 3 in [1, 3, 3, 3, 5].
  • Graph: A data structure with nodes (vertices) connected by edges, used to model relationships. Example: A social network where users are nodes and friendships are edges.
  • Hashing: A technique to map data to a fixed-size array using a hash function, enabling fast retrieval. Example: A phone book mapping names to numbers.
  • Index: A numerical position used to access elements in an array or list. Example: In [1, 3, 5], the index of 5 is 2.
  • Iterative Algorithm: An algorithm that uses loops to repeat steps, avoiding recursion. Example: Iterative Binary Search uses a while loop to halve the search range.
  • Linked List: A data structure where elements (nodes) are linked by pointers, allowing dynamic size changes. Example: A playlist where each song points to the next.
  • Logarithmic Time: Time complexity where the running time grows logarithmically with input size, common in Binary Search. Example: O(log n) for searching in a sorted array of size n.
  • Queue: A data structure that follows First-In-First-Out (FIFO) order, where elements are added at the rear and removed from the front. Example: A print job queue.
  • Recursion: A process where a function calls itself to solve smaller instances of a problem. Example: Recursive Binary Search divides the array and calls itself on a smaller range.
  • Sorted Array: An array where elements are arranged in order (e.g., ascending or descending), a prerequisite for Binary Search. Example: [1, 3, 5, 7, 9] is sorted in ascending order.
  • Space Complexity: The amount of memory an algorithm uses relative to input size. Example: Iterative Binary Search has O(1) space complexity, while recursive uses O(log n) due to the call stack.
  • Stack: A data structure that follows Last-In-First-Out (LIFO) order, where elements are added and removed from the top. Example: A browser’s back button history.
  • Time Complexity: The amount of time an algorithm takes to run relative to input size. Example: Binary Search’s O(log n) vs. Linear Search’s O(n).
  • Tree: A hierarchical data structure with nodes connected by edges, where each node has a parent and children. Example: A binary search tree for efficient searches.

✅ Tip or Warning Box

✅ Tip: Use this glossary as a quick reference when working through Binary Search exercises or other DSA topics. Understanding these terms will help you grasp problem statements, implementations, and complexity analyses more effectively.

⚠ Warning: Ensure you understand the context of each term, as some (e.g., complexity) apply differently across algorithms. For example, Binary Search requires a sorted array, unlike Linear Search, which affects their use cases.