Tagged articles
181 articles
Page 1 of 2
Java Tech Enthusiast
Java Tech Enthusiast
Apr 19, 2026 · Interview Experience

Counting Boomerangs Efficiently: Hash‑Map Solution for LeetCode 447

This article explains how to count all boomerang tuples in a set of distinct points by using a hash‑map to store distance frequencies for each anchor point, achieving O(n²) time without costly square‑root calculations and providing Java, C++, and Python implementations.

BoomerangHashMapLeetCode
0 likes · 7 min read
Counting Boomerangs Efficiently: Hash‑Map Solution for LeetCode 447
JavaGuide
JavaGuide
Oct 27, 2025 · Backend Development

OPPO 2026 Campus Hiring: Salary Insights and In‑Depth Java Exception & Concurrency Guide

The article reviews OPPO’s 2026 campus hiring salaries for backend and algorithm roles, outlines the interview stages, and provides a comprehensive Java guide covering exceptions, checked vs unchecked, reference types, HashMap concurrency issues, ConcurrentHashMap internals, and the differences between synchronized and volatile.

Backend DevelopmentCampus RecruitmentException Handling
0 likes · 17 min read
OPPO 2026 Campus Hiring: Salary Insights and In‑Depth Java Exception & Concurrency Guide
IT Services Circle
IT Services Circle
Sep 25, 2025 · Backend Development

Master Java Interviews: Overloading, HashMap, Thread Pools, GC & HTTP Essentials

This article combines practical advice for negotiating offers at Tonghuashun with a comprehensive Java interview cheat‑sheet covering method overloading vs overriding, final vs finally, sleep vs wait, HashMap insertion and resizing, reference types, HTTP request structure, status codes, thread‑pool parameters, and garbage‑collection algorithms.

GarbageCollectionHTTPHashMap
0 likes · 23 min read
Master Java Interviews: Overloading, HashMap, Thread Pools, GC & HTTP Essentials
Cognitive Technology Team
Cognitive Technology Team
Sep 14, 2025 · Fundamentals

Unlocking Java HashMap: How It Works, Optimizations & Common Pitfalls

This article explores Java's HashMap internals, detailing its bucket array design, hash processing, collision handling, Java 8 treeification, resizing strategy, load factor and threshold calculations, performance optimization tips, common pitfalls, and when to choose alternative map implementations for high‑concurrency or ordered use cases.

Data StructuresHashMapJava
0 likes · 9 min read
Unlocking Java HashMap: How It Works, Optimizations & Common Pitfalls
Tech Freedom Circle
Tech Freedom Circle
Sep 1, 2025 · Databases

How ClickHouse Executes GROUP BY and Handles Real‑Time Analytics on Billions of Rows

This article explains ClickHouse’s core architecture—including its storage‑compute integration, MPP parallelism, columnar storage, vectorized execution, data pre‑sorting, table engines, sparse and auxiliary indexes, and the two‑stage aggregation pipeline—then walks through the exact GROUP BY execution flow for both local and distributed tables, illustrating each step with diagrams, SQL demos, and code snippets.

ClickHouseColumnar StorageDistributed Query
0 likes · 29 min read
How ClickHouse Executes GROUP BY and Handles Real‑Time Analytics on Billions of Rows
NiuNiu MaTe
NiuNiu MaTe
Sep 1, 2025 · Backend Development

How Does Java’s HashMap Resolve Hash Collisions? From Linked Lists to Red‑Black Trees

Java’s HashMap tackles hash collisions through a combination of perturbation functions, chaining, open addressing, and, since JDK 8, converting long chains into red‑black trees, with detailed explanations of the underlying algorithms, resizing mechanics, threshold choices, and performance trade‑offs for developers and interview candidates.

Hash CollisionHashMapJava
0 likes · 17 min read
How Does Java’s HashMap Resolve Hash Collisions? From Linked Lists to Red‑Black Trees
Java Architect Essentials
Java Architect Essentials
Jul 14, 2025 · Backend Development

Boost Java Loop Performance: From Nested Loops to Map Lookup

This article demonstrates how replacing a naïve double‑for‑loop that matches IDs between two large Java lists with a HashMap lookup dramatically reduces execution time, explains the underlying time‑complexity reasons, and provides concrete code examples for both approaches.

HashMapnested loopsoptimization
0 likes · 8 min read
Boost Java Loop Performance: From Nested Loops to Map Lookup
Programmer Null's Self-Cultivation
Programmer Null's Self-Cultivation
Jul 13, 2025 · Backend Development

Unlocking the Secrets of Java’s ConcurrentHashMap: From JDK 7 to JDK 8

This article provides a comprehensive, step‑by‑step analysis of Java's ConcurrentHashMap, covering its evolution from JDK 7’s segment‑lock design to JDK 8’s bucket‑level CAS and synchronized approach, complete with macro diagrams, microscopic source‑code walkthroughs, hash calculations, resizing mechanisms, and practical usage tips.

ConcurrentHashMapHashMapJDK7
0 likes · 16 min read
Unlocking the Secrets of Java’s ConcurrentHashMap: From JDK 7 to JDK 8
Java Backend Full-Stack
Java Backend Full-Stack
Jul 3, 2025 · Interview Experience

Why the Second Question in My SF Interview Made Me Walk Away

The article shares a detailed SF interview experience, covering typical Java interview questions such as self‑introduction, challenging projects, learning paths, abstract class vs interface, HashMap vs Hashtable, insertion steps, red‑black and B+ trees, MySQL and Redis indexing choices, large‑table optimization, JVM memory model, and the purpose of the Survivor space.

Data StructuresHashMapJVM
0 likes · 23 min read
Why the Second Question in My SF Interview Made Me Walk Away
Java Tech Enthusiast
Java Tech Enthusiast
Jun 28, 2025 · Backend Development

Mastering Java Interviews: HashMap, ConcurrentHashMap, JVM GC, and SQL Tricks

This article shares a real HSBC interview experience and provides in‑depth explanations of Java HashMap internals, ConcurrentHashMap locking mechanisms, differences between synchronized and ReentrantLock, JVM garbage‑collection nuances, memory‑overflow causes, and practical SQL queries for extracting top scores.

ConcurrentHashMapHashMapJVM
0 likes · 13 min read
Mastering Java Interviews: HashMap, ConcurrentHashMap, JVM GC, and SQL Tricks
Java Web Project
Java Web Project
Jun 25, 2025 · Backend Development

How to Speed Up Nested Loops in Java: Break and Map Tricks

This article walks through a common Java scenario of matching two large lists with nested loops, measures the poor performance, then demonstrates two optimizations—adding a break statement and replacing the inner loop with a HashMap—to dramatically cut execution time.

HashMapJavaNested Loop
0 likes · 6 min read
How to Speed Up Nested Loops in Java: Break and Map Tricks
Cognitive Technology Team
Cognitive Technology Team
May 16, 2025 · Fundamentals

Why Java Switched HashMap Insertion to Tail and How It Affects Concurrency

This article examines the evolution of Java's HashMap from head‑insertion in JDK 1.7 to tail‑insertion in JDK 1.8, explains how the change eliminates circular‑list deadlocks during concurrent resizing, discusses remaining concurrency pitfalls such as red‑black tree conversion, and offers best‑practice solutions like using ConcurrentHashMap and proper initial capacity settings.

Data StructuresHashMapJDK
0 likes · 10 min read
Why Java Switched HashMap Insertion to Tail and How It Affects Concurrency
Java Tech Enthusiast
Java Tech Enthusiast
Apr 2, 2025 · Backend Development

Understanding the Underlying Mechanism of Java HashMap

Java’s HashMap stores entries in a hash‑based array where a key’s hash determines the bucket index, resolves collisions with linked lists that become red‑black trees for long chains, resizes when the load factor exceeds 0.75, and requires ConcurrentHashMap for safe multithreaded updates, a core concept often asked in interviews.

BackendData StructureHashMap
0 likes · 6 min read
Understanding the Underlying Mechanism of Java HashMap
Architecture Digest
Architecture Digest
Mar 18, 2025 · Fundamentals

Understanding Java foreach Loop, HashMap Iteration, and ConcurrentModificationException

This article explains how Java's foreach loop is implemented using iterators, demonstrates the bytecode differences between array and collection traversal, analyzes why modifying a HashMap during foreach can trigger ConcurrentModificationException, and shows the correct way to safely modify collections with an iterator.

CollectionsConcurrentModificationExceptionHashMap
0 likes · 11 min read
Understanding Java foreach Loop, HashMap Iteration, and ConcurrentModificationException
Java Tech Enthusiast
Java Tech Enthusiast
Mar 16, 2025 · Interview Experience

Why Strong Coders Still Fail Interviews: 3 Hidden Gaps Revealed

A technically proficient developer with seven years of experience keeps getting rejected in first or second interview rounds because he lacks deep understanding of HashMap O(1) mechanics, cannot articulate architecture trade‑offs, and rarely reflects systematically on his projects, as outlined in three key problem areas.

Career DevelopmentHashMapSoftware Engineering
0 likes · 6 min read
Why Strong Coders Still Fail Interviews: 3 Hidden Gaps Revealed
Lin is Dream
Lin is Dream
Mar 12, 2025 · Fundamentals

Unlocking Java’s HashMap: How Hash Functions Power Fast Lookups

This article explains the fundamentals of hash structures, hash functions, and Java collection implementations such as HashMap, LinkedHashMap, and ConcurrentHashMap, covering their design, collision handling, performance characteristics, and how Redis extends these concepts to a distributed environment.

Data StructuresHashMaphash function
0 likes · 12 min read
Unlocking Java’s HashMap: How Hash Functions Power Fast Lookups
macrozheng
macrozheng
Mar 11, 2025 · Backend Development

Boost Java Loop Performance: Replace Nested Loops with Map Lookups

This article demonstrates how to dramatically speed up Java data‑matching operations that use nested for‑loops by breaking early when a match is found and by converting the inner list into a HashMap for O(1) lookups, showing code examples, performance measurements, and practical tips for backend developers.

HashMapJavaNested Loop
0 likes · 7 min read
Boost Java Loop Performance: Replace Nested Loops with Map Lookups
Java Tech Enthusiast
Java Tech Enthusiast
Feb 1, 2025 · Backend Development

Optimizing Nested Loops in Java with Map and Break

To avoid the O(n × m) cost of naïve nested loops when matching IDs, replace the inner scan with a break after a unique match or, far more efficiently, build a HashMap of the secondary list so each lookup becomes O(1), dropping overall complexity to O(n + m) and cutting execution time from tens of seconds to a few hundred milliseconds.

HashMapJavaMAP
0 likes · 8 min read
Optimizing Nested Loops in Java with Map and Break
macrozheng
macrozheng
Dec 16, 2024 · Backend Development

Boost Java Loop Performance: Replace Nested Loops with a HashMap

This article demonstrates how to dramatically speed up Java code that matches items between two large lists by eliminating nested loops, using early‑exit with break and, more effectively, pre‑building a HashMap for O(1) lookups, with concrete timing results and full code examples.

Backend DevelopmentHashMapJava
0 likes · 8 min read
Boost Java Loop Performance: Replace Nested Loops with a HashMap
Java Captain
Java Captain
Nov 19, 2024 · Backend Development

Optimizing Nested Loop Data Matching with a Map in Java

This article demonstrates how replacing a costly nested‑loop search for matching user IDs with a pre‑built HashMap dramatically reduces processing time from tens of seconds to a few seconds, explaining the underlying time‑complexity benefits and providing complete Java code examples.

CollectionsHashMapNested Loop
0 likes · 6 min read
Optimizing Nested Loop Data Matching with a Map in Java
Su San Talks Tech
Su San Talks Tech
Sep 23, 2024 · Backend Development

Boost Java Performance: 5 Proven HashMap & Enum Optimizations

This article presents five practical Java performance tweaks—pre‑allocating HashMap capacity, using object keys, caching Enum values, replacing String constants with Enums, and upgrading the JDK—backed by JMH benchmarks that show up to 9.5× speed gains.

BenchmarkHashMapJDK
0 likes · 17 min read
Boost Java Performance: 5 Proven HashMap & Enum Optimizations
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 17, 2024 · Backend Development

In‑Depth Explanation of Java ConcurrentHashMap Core Principles and Source Code

This article provides a comprehensive analysis of Java's ConcurrentHashMap, covering its underlying data structures, key attributes, core components such as Node, ForwardingNode, TreeBin, and TreeNode, and detailed explanations of the put, get, hash, and resizing algorithms with annotated source code examples.

ConcurrentHashMapData StructuresHashMap
0 likes · 17 min read
In‑Depth Explanation of Java ConcurrentHashMap Core Principles and Source Code
Java Tech Enthusiast
Java Tech Enthusiast
Sep 6, 2024 · Mobile Development

Bundle vs HashMap in Android: Memory Efficiency and Performance

In Android, Bundles backed by memory‑efficient ArrayMap use binary search and shrinkable storage, making them far smaller and faster to transmit than HashMaps, whose fixed‑size growth and lack of shrinkage consume more memory; thus Parcelable Bundles are preferred for IPC, while Serializable remains suited only for persistent storage.

AndroidArrayMapHashMap
0 likes · 5 min read
Bundle vs HashMap in Android: Memory Efficiency and Performance
Top Architect
Top Architect
Jul 27, 2024 · Backend Development

Various Ways to Iterate Over a Java HashMap with Code Examples

This article demonstrates seven common techniques for iterating over a Java HashMap—including iterator, entrySet, keySet, for‑each loops, lambda expressions, and both single‑threaded and parallel Streams API—providing concise code examples and performance notes for each method.

Code ExampleHashMapJava
0 likes · 10 min read
Various Ways to Iterate Over a Java HashMap with Code Examples
DaTaobao Tech
DaTaobao Tech
May 8, 2024 · Fundamentals

Comprehensive Overview of Java Fundamentals

This article surveys Java fundamentals, explaining OOP principles, differences from C++, polymorphism, static/final keywords, abstract classes versus interfaces, generics with type erasure, reflection, exception handling, core data structures, HashMap internals, serialization, key design patterns, and essential language constructs for developers.

Exception HandlingGenericsHashMap
0 likes · 16 min read
Comprehensive Overview of Java Fundamentals
Architecture Digest
Architecture Digest
Apr 14, 2024 · Backend Development

Optimizing Nested Loops in Java: From O(N²) to O(N) Using HashMap

This article demonstrates how to replace a costly double‑for‑loop that matches two large lists of users with a HashMap lookup, showing performance measurements, the effect of adding a break statement, and detailed Java code examples for backend developers.

Backend DevelopmentHashMapJava
0 likes · 7 min read
Optimizing Nested Loops in Java: From O(N²) to O(N) Using HashMap
IT Services Circle
IT Services Circle
Apr 13, 2024 · Fundamentals

Java Interview Questions: Collections, HashMap, Concurrency, JVM Memory, GC, References, and Redis

This article compiles a set of Java interview questions covering the differences between ArrayList and LinkedList, the internal workings and resizing of HashMap, concurrency primitives like synchronized and ReentrantLock, JVM memory layout, garbage‑collection algorithms, reference types, and Redis persistence and distributed‑lock mechanisms.

HashMapJVMJava
0 likes · 21 min read
Java Interview Questions: Collections, HashMap, Concurrency, JVM Memory, GC, References, and Redis
IT Services Circle
IT Services Circle
Mar 12, 2024 · Fundamentals

LRU Cache Design and Java Implementation with O(1) Operations

This article explains the LeetCode LRU Cache problem, detailing the required class interface, operational constraints, and provides a thorough Java solution using a HashMap combined with a doubly linked list to achieve O(1) time complexity for get and put operations.

Data StructuresDoubly Linked ListHashMap
0 likes · 10 min read
LRU Cache Design and Java Implementation with O(1) Operations
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 24, 2024 · Mobile Development

Unlock Peak Kotlin Performance with Advanced Refactoring Techniques

This article guides developers through a series of Kotlin refactoring steps—replacing when statements with HashMap, introducing payload mechanisms, infix functions, inline registration, and delegated properties—to dramatically improve event‑handling performance, readability, and maintainability while adhering to the single‑responsibility principle.

HashMapInfix FunctionsKotlin
0 likes · 16 min read
Unlock Peak Kotlin Performance with Advanced Refactoring Techniques
Su San Talks Tech
Su San Talks Tech
Dec 4, 2023 · Fundamentals

Can You Build a HashMap from Scratch? A Step‑by‑Step Java Guide

This article walks you through the fundamentals of hash tables, explains bucket arrays and hash functions, discusses collision resolution strategies, and provides a complete Java implementation of a simple HashMap called ThirdHashMap with code, tests, and performance notes.

Data StructuresHashMapJava
0 likes · 13 min read
Can You Build a HashMap from Scratch? A Step‑by‑Step Java Guide
Architecture Digest
Architecture Digest
Nov 21, 2023 · Backend Development

Understanding Why HashMap.keySet() Traverses Twice in Java

This article explains the internal mechanics of HashMap traversal in Java, comparing iterator, keySet, entrySet and stream approaches, and reveals why using keySet results in two passes—once to obtain an iterator and once to fetch values—by examining the underlying KeySet, KeyIterator, and HashIterator implementations.

HashMapIteratorJava
0 likes · 8 min read
Understanding Why HashMap.keySet() Traverses Twice in Java
Java Architect Essentials
Java Architect Essentials
Nov 16, 2023 · Backend Development

Why Does HashMap.keySet() Iterate Twice? Uncovering Java’s Internal Iterator Mechanics

This article explains why iterating a Java HashMap with keySet() results in two traversals, detailing the internal iterator creation, the role of KeyIterator and HashIterator classes, and how the do‑while loop in HashIterator’s constructor locates the first entry, with code examples and bytecode analysis.

HashIteratorHashMapIterator
0 likes · 9 min read
Why Does HashMap.keySet() Iterate Twice? Uncovering Java’s Internal Iterator Mechanics
Su San Talks Tech
Su San Talks Tech
Oct 30, 2023 · Backend Development

Boost Backend Performance with HashMap, LinkedHashMap, TreeMap & ByteBuffer

This article explores four powerful yet understated caching techniques—HashMap with read‑write locks, LinkedHashMap‑based LRU caches, TreeMap for consistent hashing, and ByteBuffer pooling—detailing their implementations in middleware such as RocketMQ, MyBatis, and Cobar to enhance backend performance.

Backend DevelopmentByteBufferConcurrentHashMap
0 likes · 10 min read
Boost Backend Performance with HashMap, LinkedHashMap, TreeMap & ByteBuffer
Java Architect Essentials
Java Architect Essentials
Nov 25, 2022 · Backend Development

Understanding HashMap Initial Capacity and Proper Usage in Java

This article explains why specifying an initial capacity for Java's HashMap matters, demonstrates common mistakes, walks through the source‑code calculation of the capacity and resize threshold, and provides guidelines on choosing the correct capacity to avoid unnecessary rehashing and improve performance.

CollectionsHashMapinitial capacity
0 likes · 7 min read
Understanding HashMap Initial Capacity and Proper Usage in Java
Sohu Tech Products
Sohu Tech Products
Oct 12, 2022 · Fundamentals

Understanding the Underlying Principles of Java HashMap

This article explains how Java's HashMap stores key‑value pairs using an array of nodes, how hash functions map keys to array indices, how collisions are handled with linked lists and red‑black trees, and why proper hashCode implementations are crucial for performance.

CollisionData StructureHashMap
0 likes · 20 min read
Understanding the Underlying Principles of Java HashMap
Sohu Tech Products
Sohu Tech Products
Oct 7, 2022 · Fundamentals

Understanding the Underlying Principles of Java HashMap

This article explains how Java's HashMap stores key‑value pairs using an array‑plus‑linked‑list structure, details the hash function, index calculation, collision handling, resizing, and the conditions under which linked lists are replaced by red‑black trees, illustrated with concrete code examples.

CollisionHashMapRed-Black Tree
0 likes · 20 min read
Understanding the Underlying Principles of Java HashMap
Selected Java Interview Questions
Selected Java Interview Questions
Sep 25, 2022 · Backend Development

Understanding Component Implementation Principles for Technical Interviews

The article explains why interviewers probe the implementation details of backend components such as Redis, HashMap, and Memcached, illustrates common interview questions, and shows how mastering the underlying data structures, algorithms, and memory‑allocation mechanisms can improve both interview performance and real‑world problem solving.

AlgorithmsBackendData Structures
0 likes · 8 min read
Understanding Component Implementation Principles for Technical Interviews
Top Architect
Top Architect
Jul 23, 2022 · Backend Development

Four Methods to Traverse a Java Map Using keySet, entrySet and Iterators

This article demonstrates four practical ways to iterate over a Java HashMap—including enhanced for loops with keySet(), iterator-based loops with keySet(), enhanced for loops with entrySet(), and iterator-based loops with entrySet()—and provides a complete example that filters employee objects by salary, complete with full source code.

BackendCollectionsHashMap
0 likes · 10 min read
Four Methods to Traverse a Java Map Using keySet, entrySet and Iterators
Senior Brother's Insights
Senior Brother's Insights
Jun 13, 2022 · Fundamentals

Why Does Java’s ArrayList Default to a Capacity of 10?

This article explains why Java’s ArrayList uses a default initial capacity of 10, contrasts it with HashMap’s 16‑element default, and walks through the lazy‑initialization logic and growth algorithm that keep the capacity at ten until the first element is added.

ArrayListData StructuresDefault Capacity
0 likes · 9 min read
Why Does Java’s ArrayList Default to a Capacity of 10?
Ctrip Technology
Ctrip Technology
May 26, 2022 · Backend Development

Memory Structure Selection and Optimization for Hotel Query Service

This article examines how Ctrip's hotel query service selects and optimizes in‑memory cache structures—covering Java object layout, HashMap overhead, alternative collections, and various encoding techniques—to achieve high‑performance reads and updates while drastically reducing memory consumption.

CacheHashMapJava
0 likes · 23 min read
Memory Structure Selection and Optimization for Hotel Query Service
Java Backend Technology
Java Backend Technology
Apr 25, 2022 · Backend Development

Why Netty’s IntObjectHashMap Beats HashMap: Deep Dive into Performance and Design

This article explores Netty’s IntObjectHashMap, explaining how its use of primitive int keys and open‑addressing linear probing reduces memory overhead and improves performance compared to standard HashMap, while detailing its source‑code evolution, capacity handling, probing strategy, load factor, and deletion compaction.

Data StructuresHashMapIntObjectHashMap
0 likes · 19 min read
Why Netty’s IntObjectHashMap Beats HashMap: Deep Dive into Performance and Design
Su San Talks Tech
Su San Talks Tech
Apr 9, 2022 · Backend Development

Why Netty’s IntObjectHashMap Beats HashMap: A Deep Dive into Performance and Design

This article explores how Netty’s IntObjectHashMap improves high‑concurrency ticket‑pricing scenarios by using primitive int keys, open‑addressing linear probing, and careful capacity adjustments, revealing the source‑code evolution, hashIndex optimizations, load‑factor tuning, and deletion compaction that together deliver significant memory and CPU savings.

Data StructuresHashMapIntObjectHashMap
0 likes · 20 min read
Why Netty’s IntObjectHashMap Beats HashMap: A Deep Dive into Performance and Design
Cognitive Technology Team
Cognitive Technology Team
Apr 4, 2022 · Fundamentals

Why Removing Elements from a HashMap During a For‑Each Loop Causes ConcurrentModificationException and How to Fix It

Iterating a HashMap with a for‑each loop while calling its remove method triggers a ConcurrentModificationException because the loop uses an internal iterator that becomes inconsistent with the map’s modCount, and the article explains the cause, shows decompiled code, and provides correct removal approaches using the iterator or removeIf.

CollectionsConcurrentModificationExceptionHashMap
0 likes · 6 min read
Why Removing Elements from a HashMap During a For‑Each Loop Causes ConcurrentModificationException and How to Fix It
Java Captain
Java Captain
Mar 13, 2022 · Fundamentals

Understanding the Underlying Data Structure and Mechanics of Java HashMap

This article explains Java HashMap's internal structure, including the array‑linked list and red‑black tree design, load factor, collision resolution methods, resizing process, key selection, thread‑safety concerns, and the hash calculation algorithm, providing detailed insights for developers.

Data StructureHashMapJDK
0 likes · 17 min read
Understanding the Underlying Data Structure and Mechanics of Java HashMap
JD Tech
JD Tech
Mar 8, 2022 · Fundamentals

Fundamentals of Data Structures and Algorithms

This article provides a comprehensive overview of fundamental data structures and algorithms, covering basic concepts, complexity analysis, case studies, and detailed examinations of structures such as HashMap, Bloom filter, SkipList, AVL, Red‑Black, B+Tree, and HashTree, while discussing their advantages, disadvantages, and typical use cases.

AVL treeData StructuresHashMap
0 likes · 23 min read
Fundamentals of Data Structures and Algorithms
Java Interview Crash Guide
Java Interview Crash Guide
Feb 28, 2022 · Fundamentals

Understanding Java HashMap: Collision Resolution and Performance

This article explains the internal structure of Java's HashMap, how it computes hash codes, resolves collisions using chaining, the impact of load factor and capacity on performance, and provides detailed source code analysis of its key methods such as put, get, resize, and entry handling.

CollisionData StructureHashMap
0 likes · 22 min read
Understanding Java HashMap: Collision Resolution and Performance
Programmer DD
Programmer DD
Feb 16, 2022 · Backend Development

Master Tencent Interview: Deep Dive into HashMap, Redis, MySQL & System Design

This article compiles a comprehensive set of Tencent interview questions and detailed answers covering HashMap internals, thread safety, red‑black trees, Redis performance, MySQL indexing, TCP reliability, IO multiplexing, RPC, and system bottleneck analysis to help candidates prepare effectively.

BackendHashMapinterview
0 likes · 11 min read
Master Tencent Interview: Deep Dive into HashMap, Redis, MySQL & System Design
Java Tech Enthusiast
Java Tech Enthusiast
Dec 14, 2021 · Fundamentals

Analysis of Java HashMap put Method and Internal Mechanics

The article dissects Java’s HashMap put method, explaining how it computes a mixed hash, locates an index in a power‑of‑two table, inserts or replaces nodes in a linked‑list chain that may be converted to a red‑black tree, and triggers resizing when the load‑factor threshold is exceeded.

AlgorithmsCollectionsData Structures
0 likes · 13 min read
Analysis of Java HashMap put Method and Internal Mechanics
Architect's Tech Stack
Architect's Tech Stack
Oct 17, 2021 · Fundamentals

Understanding Why HashMap Uses a Load Factor of 0.75 and How It Resolves Collisions

This article explains the purpose of HashMap's load factor, the trade‑offs between space utilization and collision probability, describes common collision‑resolution techniques such as open addressing, rehashing and chaining, and shows why the default load factor of 0.75 is chosen based on Poisson‑distribution analysis.

Data StructuresHashMapJava
0 likes · 12 min read
Understanding Why HashMap Uses a Load Factor of 0.75 and How It Resolves Collisions
Selected Java Interview Questions
Selected Java Interview Questions
Sep 30, 2021 · Fundamentals

Understanding the Role of modCount in Java HashMap's Fail‑Fast Mechanism

The article clarifies that the modCount field in java.util.HashMap is used to implement the fail‑fast iterator behavior, explains why the field was volatile in early JDK versions but not in later ones, and shows that ConcurrentModificationException can be thrown even in single‑threaded scenarios when the iterator detects structural changes.

ConcurrentModificationExceptionHashMapJDK
0 likes · 5 min read
Understanding the Role of modCount in Java HashMap's Fail‑Fast Mechanism
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 25, 2021 · Fundamentals

Overview of Java Collection Framework and Core Concepts

This article provides a comprehensive overview of Java collections, covering the definition, characteristics, differences from arrays, advantages, common collection classes, underlying data structures, fail‑fast mechanism, detailed List, Set, Queue, and Map interfaces, as well as HashMap and ConcurrentHashMap implementations and best practices.

ArrayListCollectionsData Structures
0 likes · 30 min read
Overview of Java Collection Framework and Core Concepts
Java Interview Crash Guide
Java Interview Crash Guide
Sep 8, 2021 · Backend Development

How to Scale Redis for Billions of Keys: Memory‑Efficient Strategies

This article explores the challenges of storing billions of mapping records for a DMP in Redis and presents practical solutions such as eviction policies, key bucketing, hash‑map optimization, fragmentation reduction, and specialized memory allocators to achieve millisecond‑level real‑time queries.

HashMapJavaKey Bucketing
0 likes · 11 min read
How to Scale Redis for Billions of Keys: Memory‑Efficient Strategies
Programmer DD
Programmer DD
Aug 14, 2021 · Fundamentals

Why Overriding hashCode() Matters: Java HashSet Gotchas Explained

This article explains the purpose of Java's hashCode() and equals() methods, outlines the rules for overriding them, demonstrates common pitfalls with HashSet through a concrete code example, and clarifies why both methods must be overridden when using custom objects as HashMap keys.

CollectionsHashMapJava
0 likes · 6 min read
Why Overriding hashCode() Matters: Java HashSet Gotchas Explained
Top Architect
Top Architect
Jul 1, 2021 · Fundamentals

Five Best Ways to Iterate a Java HashMap

This article demonstrates five optimal techniques for traversing a Java HashMap—including using an Iterator over the entry set or key set, a for‑each loop, Lambda expressions, and the Stream API—providing complete code examples and sample outputs for each method.

HashMapIteratorJava
0 likes · 7 min read
Five Best Ways to Iterate a Java HashMap
Selected Java Interview Questions
Selected Java Interview Questions
Jun 2, 2021 · Fundamentals

Understanding Dart’s HashMap and LinkedHashMap: Implementation Details and Interview Questions

This article explains the internal implementation of Dart's HashMap and LinkedHashMap, compares them with Java's versions, provides common interview questions, and demonstrates creation, lookup, insertion, deletion, resizing, and iteration with code examples to help developers prepare for technical interviews.

DARTHashMapLinkedHashMap
0 likes · 22 min read
Understanding Dart’s HashMap and LinkedHashMap: Implementation Details and Interview Questions
Su San Talks Tech
Su San Talks Tech
Apr 28, 2021 · Fundamentals

Master Java Concurrency: HashMap, ConcurrentHashMap, JMM, Thread Pools & More

Explore deep Java concurrency concepts, from HashMap internals and its JDK7/JDK8 differences to ConcurrentHashMap’s lock strategies, thread states, memory models, volatile, CAS, synchronized, thread pools, AQS, and common interview questions, providing comprehensive insights for mastering multithreaded programming.

HashMapJMMThreadPool
0 likes · 38 min read
Master Java Concurrency: HashMap, ConcurrentHashMap, JMM, Thread Pools & More
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 20, 2021 · Backend Development

Comprehensive Java HashMap Interview Questions and Answers

This article provides a thorough collection of over 30 common Java HashMap interview questions, explaining its underlying data structures, hashing mechanisms, collision resolution, resizing, thread safety, and differences from related maps, along with detailed answers and code examples for each topic.

CollectionsHashMapJava
0 likes · 21 min read
Comprehensive Java HashMap Interview Questions and Answers
Intelligent Backend & Architecture
Intelligent Backend & Architecture
Apr 2, 2021 · Fundamentals

Master Java Collections: From ArrayList to ConcurrentHashMap Explained

This article provides a comprehensive overview of Java's collection framework, detailing the roles of interfaces, implementations, and algorithms, comparing collections with arrays, describing common List, Set, and Map classes, their underlying data structures, thread‑safety characteristics, and best practices for iteration and usage.

CollectionsConcurrentHashMapData Structures
0 likes · 48 min read
Master Java Collections: From ArrayList to ConcurrentHashMap Explained
Top Architect
Top Architect
Mar 21, 2021 · Fundamentals

Why HashMap Uses a Load Factor of 0.75 and How It Handles Collisions

This article explains the purpose of HashMap's load factor, why the default value is 0.75, and describes various collision‑resolution techniques such as open addressing, linear and quadratic probing, rehashing, overflow areas, and chaining, supported by code examples and a Poisson‑distribution analysis.

HashMapJavaPoisson distribution
0 likes · 11 min read
Why HashMap Uses a Load Factor of 0.75 and How It Handles Collisions
Senior Brother's Insights
Senior Brother's Insights
Mar 18, 2021 · Fundamentals

Why Overriding hashCode Is Required When You Override equals in Java

This article explains the relationship between Java's equals and hashCode methods, outlines their contractual requirements, shows how the default implementations work, demonstrates proper overrides with code examples, and provides practical guidelines for implementing robust hashCode functions to ensure correct behavior in hash‑based collections.

HashMapJavacoding guidelines
0 likes · 11 min read
Why Overriding hashCode Is Required When You Override equals in Java
Top Architect
Top Architect
Mar 15, 2021 · Fundamentals

Analysis of JDK 1.8 HashMap Implementation Compared to JDK 1.7

This article explains the major differences between JDK 1.8 and JDK 1.7 HashMap implementations, detailing the initialization process, the putVal algorithm steps, how collisions are handled with linked lists and red‑black trees, and the changes in resizing behavior.

CollectionsData StructuresHashMap
0 likes · 5 min read
Analysis of JDK 1.8 HashMap Implementation Compared to JDK 1.7