# Getting Started
# Algorithms
LeetCode Hot 100 Overview
Plan your LeetCode Hot 100 journey by grouping problems by data structure and difficulty.
LeetCode Hot 100: 020 - Valid Parentheses
Use a stack (ArrayDeque) plus a map to validate a parentheses string, and see why Deque is preferred over the legacy Stack.
LeetCode Hot 100: 155 - Min Stack
Design a stack that supports push, pop, top operations, and can retrieve the minimum element in constant time, using dual stacks (data stack + auxiliary stack).
LeetCode Hot 100: 347 - Top K Frequent Elements
Count with a hash map, then keep only k candidates in a min-heap for O(n log k) time.
LeetCode Hot 100: 394 - Decode String
Parse k[encoded_string] encoding rules using dual stacks to store repetition counts and string context, supporting nested brackets and decoding in O(n) time.
LeetCode Hot 100: 739 - Daily Temperatures
Use a monotonic stack (storing indices) to find the number of days until a warmer temperature in one linear scan.
LeetCode Hot 100: 084 - Largest Rectangle in Histogram
Use a monotonic increasing stack (storing indices) with a sentinel trick to find the maximum rectangle area with each bar as the minimum height in one pass.
295 - Find Median from Data Stream
Classic two-heap approach: max-heap for the lower half, min-heap for the upper half; support online median queries.
LeetCode Hot 100: 121 - Best Time to Buy and Sell Stock
Greedy scan: track the minimum price so far, and update the best profit if selling today is better.
LeetCode Hot 100: 055 - Jump Game
Greedy approach: maintain the farthest reachable position from the start, and check if we can reach the last index.
215 - Kth Largest Element in an Array
Use Quickselect (randomized partition) to find the k-th largest element in expected O(n) time.
# Interview
Real-world Java Interview Questions Overview
Summarize real-world Java interview questions, restore the original context, and provide structured answer strategies.
Java Collections Overview
Focuses on high-frequency Java Collections questions in real interviews and how interviewers typically dig deeper, helping you systematize the core concepts.
LinkedList Source Code (JDK 8)
JDK 8 LinkedList source for reference; focus on node linking, index access, fail-fast iterators, serialization, and the spliterator.
HashMap Source Deep Dive (JDK 8, Chinese-annotated)
A source-based walkthrough of HashMap: hash spreading, bucket indexing, resizing (lo/hi split), treeification, and fail-fast iterators. The embedded source is the same Chinese-annotated JDK 8 version as the Chinese page.
HashMap High-Frequency Interview Q&A
A structured list of common HashMap interview questions: fundamentals, internals, resizing/treeification, concurrency pitfalls, and JDK 7 vs JDK 8 differences.