Commit Graph

2 Commits

Author SHA1 Message Date
9b6528d800 uebung_03: implement Task 3 (BST) and Task 4 (IntHashSet)
Task 3 adds IntBinarySearchTree with iterative add/contains and a
test class covering empty trees, duplicates, and degenerate ascending
and descending insertion orders.

Task 4 adds IntHashSet backed by an IntLinkedList bucket array with
a 0.7 load factor, Math.floorMod-based hashing for negative-int
safety, doubling resize that rehashes via a private
addWithoutResize helper, and a test class covering negatives,
Integer.MIN_VALUE, forced collisions on bucket 0, and 100-element
inserts spanning three resizes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 23:19:48 +02:00
e5fab1bec5 uebung_03: implement Task 1 (IntLinkedList) and Task 2 (generic LinkedList)
Doubly linked list with head/tail references for int values (Task 1)
and a generic LinkedList<T>/ListNode<T> version (Task 2). Both
implement add, get, remove, getSize with O(n/2) walks via the
closer-end heuristic. Includes IntLinkedListTest covering empty,
single-element, head/tail/middle removal, and out-of-bounds cases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 22:06:24 +02:00