M1 Part 2 & 3

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/28

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

29 Terms

1
New cards

Type Parameter

The placeholder for the actual type that will be used, which can be substituted with any concrete type.

2
New cards

Parameterized Type

A generic class or interface that has one or more type parameters.

3
New cards

Bounded Type Parameter

A type parameter with constraints, specifying that the type must be a subclass of a particular class or implement a particular interface.

4
New cards

Generic Method

A method that includes its own type parameters.

5
New cards

Generic Class

A class that can operate on objects of various types while providing compile-time type safety.

6
New cards

Linear Search

A straightforward search algorithm that checks each element in a collection sequentially until the target element is found or the end of the collection is reached.

7
New cards

Equality Comparison

Checking if two elements have the same value, the most common comparison in a linear search.

8
New cards

Identity Comparison

Checking if two elements refer to the exact same object in memory, more stringent than equality.

9
New cards

Abstracted Comparison

Using a generic mechanism for comparison in a linear search that allows it to work with different types of data.

10
New cards

Binary Search

An efficient algorithm for finding a target value within a sorted list by repeatedly dividing the search interval in half.

11
New cards

Sorted List

A list where elements are ordered, either in ascending or descending order, which is a prerequisite for binary search.

12
New cards

Target Value

The value that the binary search algorithm is searching for within the sorted list.

13
New cards

Middle Element

The element located at the midpoint of the current search range, compared to the target value.

14
New cards

Search Range

The portion of the list currently being considered, defined by two indices: the start and end of the range.

15
New cards

Left Half

The segment of the list before the middle element where the search continues if the target value is less than the middle element.

16
New cards

Right Half

The segment of the list after the middle element where the search continues if the target value is greater than the middle element.

17
New cards

Iterative Binary Search

A version of binary search that uses a loop to repeatedly narrow down the search range.

18
New cards

Sorting

The process of arranging elements in a specific order, typically ascending or descending, based on a comparison function.

19
New cards

Ascending

Arranging elements from smallest to largest.

20
New cards

Descending

Arranging elements from largest to smallest.

21
New cards

Stable Sorting

A sorting algorithm is stable if it preserves the relative order of equal elements from the input in the output.

22
New cards

In-Place Sorting

A sorting algorithm is in-place if it requires only a constant amount of extra space aside from the input data.

23
New cards

Comparison-Based Sorting

Sorting algorithms that determine the order of elements by comparing them to one another using a comparison function.

24
New cards

Bubble Sort

A simple comparison-based algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.

25
New cards

Selection Sort

A comparison-based algorithm that repeatedly finds the minimum (or maximum) element from the unsorted portion and places it at the beginning (or end) of the list.

26
New cards

Insertion Sort

A comparison-based algorithm that builds the final sorted list one item at a time by repeatedly taking the next element and inserting it into its correct position.

27
New cards

Best Case

The scenario where the algorithm performs the fewest steps.

28
New cards

Worst Case

The scenario where the algorithm performs the most steps.

29
New cards

Average Case

The expected performance across all possible inputs, considered the most practical measure.