Data Structures and Algorithms in Java

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

1/21

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards generated from the Data Structures & Algorithms Java lecture notes, covering essential computer science concepts, Java architecture details, algorithms, and key data structure definitions.

Last updated 2:02 PM on 10/3/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

22 Terms

1
New cards

Algorithm

A finite, well-defined sequence of steps that solves a problem.

2
New cards

Data Structure

A way of organising data in memory so that operations such as insert, delete, search, and update are efficient.

3
New cards

JDK (Java Development Kit)

The complete development kit containing the JRE along with development tools such as javac, javadoc, jar, and debuggers.

4
New cards

JRE (Java Runtime Environment)

The execution environment containing the JVM and core class libraries required to run Java programs.

5
New cards

JVM (Java Virtual Machine)

An abstract machine that loads, verifies, and executes bytecode using a class loader, interpreter, and JIT (Just-In-Time) compiler.

6
New cards

Integer Caching Trap

The behavior in Java where Integer wrapper objects within the range −128-128 to 127127 are cached and evaluate to true on == comparisons, whereas values outside this range evaluate to false.

<p>The behavior in Java where Integer wrapper objects within the range $$-128$$ to $$127$$ are cached and evaluate to true on <code>==</code> comparisons, whereas values outside this range evaluate to false.</p>
7
New cards

Amortized Analysis

An analysis method computing the average cost per operation over a worst-case sequence of operations, such as dynamic array reallocation in ArrayList.add() averaging O(1)O(1).

8
New cards

Sieve of Eratosthenes

An algorithm for finding all prime numbers up to nn by iteratively marking the multiples of each prime as composite, running in O(nlog⁡(log⁡(n)))O(n \log(\log(n))) time.

9
New cards

Kadane's Algorithm

An algorithm used to find the maximum sum of a contiguous subarray in an array of numbers in O(n)O(n) time.

10
New cards

Moore's Voting Algorithm

An algorithm that identifies the majority element (an element appearing more than n2\frac{n}{2} times) in an array using O(n)O(n) time and O(1)O(1) auxiliary space.

11
New cards

Cycle Sort

An in-place sorting algorithm used when elements fall in the range 11 to nn (or 00 to nn), placing each element directly at its correct index in O(n)O(n) time.

12
New cards

Knuth-Morris-Pratt (KMP) Algorithm

A pattern-matching algorithm that utilizes a longest proper prefix-suffix (LPS) array to prevent redundant character checks, running in O(n+m)O(n + m) time.

13
New cards

LRU Cache

A Least Recently Used cache structure maintaining item access order using a HashMap combined with a doubly linked list to achieve O(1)O(1) get and put operations.

14
New cards

Monotonic Stack

A stack structure maintaining its elements strictly in increasing or decreasing order, used to find the next or previous greater or smaller element in O(n)O(n) time.

15
New cards

Dijkstra's Algorithm

A greedy single-source shortest path algorithm for graphs with non-negative edge weights using a min-priority queue, running in O((V+E)log⁡(V))O((V + E) \log(V)) time.

16
New cards

Bellman-Ford Algorithm

A single-source shortest path algorithm capable of handling graphs with negative edge weights and detecting negative weight cycles in O(V×E)O(V \times E) time.

17
New cards

Floyd-Warshall Algorithm

A dynamic programming algorithm designed to compute all-pairs shortest paths in a weighted graph in O(V3)O(V^3) time.

18
New cards

Disjoint Set Union (DSU)

A data structure tracking a partition of elements into disjoint sets that supports find and union operations in near-constant time (O(α(n))O(\alpha(n))) using path compression and union by rank or size.

19
New cards

Trie

A tree-based prefix data structure storing strings character by character, enabling search, insertion, and prefix lookups in O(L)O(L) time where LL is the length of the string.

20
New cards

Segment Tree

A binary tree structure that stores range aggregate values over array intervals, allowing range queries and point or range updates in O(log⁡(n))O(\log(n)) time.

21
New cards

Fenwick Tree (Binary Indexed Tree)

A compact structure that computes prefix sums and supports element updates in an array in O(log⁡(n))O(\log(n)) time using bitwise operations (i & (-i)).

22
New cards

A* Search Algorithm

A pathfinding algorithm evaluating nodes using f(n)=g(n)+h(n)f(n) = g(n) + h(n), combining the actual path cost g(n)g(n) with an admissible heuristic estimate h(n)h(n).