Educational Cards

Learn from video content, text, and interactive tasks

Filters
Clear
synchronized and monitors

synchronized in Java locks a monitor (object). Only one thread holds the lock. Visibility and...

Intermediate Algorithms and Data Structures
Merge Sort

Merge Sort divides the array, sorts recursively, and merges two sorted halves. Time Theta(n log n),...

Beginner Algorithms and Data Structures
Quicksort Idea

Quicksort chooses a pivot, partitions into smaller/larger, and recursively sorts the sides....

Beginner Algorithms and Data Structures
Arrays.sort in Java

Arrays.sort: primitive types use Dual-Pivot Quicksort; objects use TimSort (merge-based, stable)....

Beginner Algorithms and Data Structures
Implementation: Hoare/Lomuto-light Partition

Implement a simple Lomuto partition using the last element as the pivot. | Variant | Return value |...

Intermediate Algorithms and Data Structures
Partition

Partition arranges the subarray so that elements <= Pivot are on the left and elements >=...

Intermediate Algorithms and Data Structures
Lower Bound Comparison Sorting

Every comparison-based sorter requires at least logarithmically many comparisons relative to n! in...

Intermediate Algorithms and Data Structures
Insertion Sort

Insertion Sort builds a sorted prefix and inserts the next element in the correct position...

Beginner Algorithms and Data Structures
Stability

A sorter is stable if equal keys maintain their relative order. Insertion Sort is stable; Selection...

Beginner Algorithms and Data Structures
When simple sorters

Simple algorithms are worthwhile for small n, for teaching purposes, and as a base case in hybrids...

Beginner Algorithms and Data Structures
Comparisons and Swaps

Analyze separately: Comparison (reading) and write/swap costs. Selection Sort: many comparisons,...

Intermediate Algorithms and Data Structures
Selection Sort

Selection Sort searches for the minimum in the unsorted area and swaps it to the next position....

Beginner Algorithms and Data Structures