Glossary
ArrayList
A dynamic, resizable array implementation in Java that allows elements to be added or removed, automatically adjusting its capacity.
Example:
To keep track of a growing list of high scores in a game, an ArrayList would be ideal as it can expand as new scores are added.
Binary Search
An efficient search algorithm that works on *sorted* data by repeatedly dividing the search interval in half until the target element is found or the interval becomes empty.
Example:
Looking up a word in a physical dictionary by opening it roughly in the middle, then deciding which half to check next, is an example of how binary search works.
Integer Array
A fixed-size data structure in Java used to store a collection of primitive integer values, accessed by an index.
Example:
Storing the daily temperature readings for a week could be done efficiently using an integer array of size 7.
Linear/Sequential Search
An algorithm that examines each element in a list, one by one, from the beginning until the target element is found or the entire list has been checked.
Example:
Imagine checking every single book on a library shelf, from left to right, to find a specific title; that's a linear search.
Search
The process of finding a specific element or its location within a collection of data.
Example:
When you use a program to locate a specific student's record in a database, you are performing a search operation.