Educational Cards
Learn from video content, text, and interactive tasks
Filters
Height and complete trees
The height of a tree is the length of the longest path from the root to a leaf (conventions vary by...
Recursion: Base Case and Decomposition
Recursion solves a problem by calling the same problem on smaller instances. Every recursive method...
Recursion on Linked Structures
Recursion fits linked and tree-like data: a node plus recursive processing of its children or the...
Call Stack and StackOverflowError
Every method call allocates a frame on the call stack. Deep recursion can lead to a...
Branching Recursion and Multiple Work
Branching recursion generates multiple calls per frame, such as naive Fibonacci: fib(n) = fib(n-1)...
Tail Recursion and Iteration in Java
End recursion means: the recursive call is the last action, and the result is passed through...
Linear Recursion: Factorial and Sum
Linear Recursion: each call generates at most one further call. Factorial: n! = 1 for n <= 1,...
Value Types and Reference Types
Primitive types (int, boolean, ...) store values directly. Reference types store references to...
equals and hashCode contract
The Contract: if a.equals(b) , then a.hashCode() and b.hashCode() must be equal. equals must be...
Reading Bounded Wildcards
Wildcards: List<? extends Number> is a list of an unknown subtype of Number (Producer). You...
Generics and Classes
Generics parameterize types: Box stores T. The compiler checks assignments and removes casts. At...
Type Erasure and Raw Types
Type Erasure: Type parameters are removed or replaced by bounds at runtime. Therefore, new T() and...