Coding Interview
200. Number of Islands
Jason Yang · 04 Aug, 2026
Number of Islands (LeetCode 200): count connected land groups with a DFS flood fill that sinks each island as it's found, in clean idiomatic Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Number of Islands (LeetCode 200): count connected land groups with a DFS flood fill that sinks each island as it's found, in clean idiomatic Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Number of 1 Bits (LeetCode 191): counting set bits with a plain shift loop, then Brian Kernighan's n & (n-1) trick that only loops once per set bit — in Java.
Coding Interview
Jason Yang · 04 Aug, 2026
Reverse Bits (LeetCode 190): peel the low bit, stack it onto the result 32 times, and the >>> vs >> shift nuance in Java. Plus the byte-cache follow-up.
Coding Interview
Jason Yang · 04 Aug, 2026
Reorder List (LeetCode 143): interleave a linked list front-to-back in O(1) space by combining three classic pointer moves — find the middle, reverse, merge.
Coding Interview
Jason Yang · 04 Aug, 2026
Linked List Cycle (LeetCode 141): why two pointers moving at different speeds must collide inside a loop, and the O(1)-space Floyd's algorithm in Java.