Tagged articles
DataStructure
27 articles · Page 1 of 1
The article explains the CopyOnWrite (COW) concept, its read‑write separation benefits for thread‑safe, read‑heavy scenarios, key implementation details in Java’s CopyOnWriteArrayList—including volatile and transient usage—and discusses its memory overhead and eventual‑consistency drawbacks.
ConcurrencyCopyOnWriteDataStructure
0 likes · 5 min read

The article first highlights Tencent's Q1 2025 financial results and user metrics, then introduces the LeetCode 2013 'Detect Squares' problem, describing its requirements, example, and offering Java, C++, Python, and array‑based solutions along with time and space complexity analysis.
C++DataStructureDetectSquares
0 likes · 9 min read

This article examines the evolution of Java's ConcurrentHashMap, comparing the segment‑lock implementation in Java 7 with the CAS‑plus‑synchronized, bucket‑level locking and red‑black tree enhancements introduced in Java 8, covering lock mechanisms, data structures, resizing strategies, core operations, performance and suitable use cases.
ConcurrencyConcurrentHashMapDataStructure
0 likes · 11 min read

This article presents a detailed walkthrough of the TreeUtil class, demonstrating how to construct hierarchical tree structures from flat lists, define tree nodes in Java, perform generic and functional implementations of makeTree, traverse trees using pre‑order, level‑order and post‑order methods, flatten trees back to lists, and sort tree nodes recursively, all illustrated with complete code examples.
DataStructureFlattenJava
0 likes · 16 min read

This article details the author's comprehensive refactor of the WorkQueue Go library, covering the redesign of its sorting heap using a red‑black tree, interface improvements, enhanced data structures, extensive performance benchmarks, and a step‑by‑step usage guide for developers.
DataStructureGoQueue
0 likes · 43 min read

This article introduces a versatile Java TreeUtil class that demonstrates how to construct hierarchical tree structures from flat lists, perform pre-order, level-order, and post-order traversals, flatten trees back to lists, and sort nodes using generic functional interfaces, with detailed code examples.
AlgorithmDataStructureJava
0 likes · 16 min read

This article explains what a queue is, classifies Java queue implementations—including blocking, non‑blocking, and double‑ended queues—provides detailed descriptions of each type, and offers code snippets and usage scenarios to help developers choose the right queue for their applications.
BlockingQueueConcurrentQueueDataStructure
0 likes · 6 min read

This article explains the design, implementation details, and practical usage of the Delaying Queue and Priority Queue modules in the WorkQueue library, covering their inheritance from the core Queue, the role of the Quadruple Heap data structure, and providing Go code examples for integration in backend systems.
BackendDataStructureDelayingQueue
0 likes · 16 min read

Blocking queues are thread‑safe data structures in Java that support blocking operations, enabling producer‑consumer coordination; this article explains their definition, differences from List/Set and regular queues, various implementations such as ArrayBlockingQueue and LinkedBlockingQueue, core methods like take and put, and bounded versus unbounded capacities.
BlockingQueueConcurrencyDataStructure
0 likes · 11 min read

By representing pre‑and post‑refresh SPU sets as RoaringBitmaps and diffing them, the system avoids full‑insert writes, cuts memory usage by orders of magnitude, speeds refreshes by over 50 % and reduces write volume nearly 87 %, solving large‑scale tag‑based product refresh challenges.
BitmapDataStructureHBase
0 likes · 14 min read

This article explains the internal structure and algorithms of Java's HashMap and LinkedHashMap, covering node definitions, constructors, hash calculations, collision handling, treeification, resizing mechanics, power‑of‑two bucket sizing, thread‑safety issues, and how LinkedHashMap enables LRU caching.
DataStructureHashMapJDK8
0 likes · 35 min read

Java’s ArrayList offers a no‑arg constructor initializing an empty internal array, lazy default capacity of ten, and overloads for initial capacity or collection copying; its add/addAll methods ensure and grow capacity, set/get access elements, and its iterator tracks modCount to detect concurrent modifications.
ConcurrencyDataStructureJava
0 likes · 16 min read

This article examines the source‑code implementations of Java HashMap and C# Dictionary, explaining their data structures, initialization, insertion, resizing, treeification, and deletion mechanisms, and compares their design choices to highlight performance and memory trade‑offs.
C#DataStructureHashMap
0 likes · 27 min read

This article provides a detailed analysis of the Android HashMap implementation in SDK 28, covering its fields, internal Node class, constructors, resizing logic, hash function, collision handling, and related Map implementations, with complete source code excerpts and performance considerations.
AndroidCollisionResolutionConcurrency
0 likes · 34 min read

This article introduces JDTuple, an Objective‑C tuple library that uses variadic functions, type encodings, and macro tricks to pack arbitrary values, provide key‑based and sequential unpacking, and simplify multi‑parameter passing and return values in iOS development.
DataStructureObjective-C++iOS
0 likes · 18 min read

This article provides an in‑depth overview of Java's Queue hierarchy, covering 18 concrete queue classes, their inheritance relationships, core methods, blocking behavior, real‑world analogies, and code examples, making it the most detailed reference on Java queues available today.
BlockingQueueDataStructureJava
0 likes · 29 min read

This article explains the internal structure of Java's HashMap, covering its array‑plus‑linked‑list‑plus‑red‑black‑tree implementation, hash function and collision resolution, the detailed put operation, resizing mechanics, and considerations for thread‑safe usage.
CollisionDataStructureHashFunction
0 likes · 10 min read

This article provides an in‑depth explanation of Java's ArrayList, covering its purpose, lack of thread safety, detailed source‑code analysis of fields, constructors and core methods, serialization mechanics, capacity handling, and a simplified hand‑written implementation for interview preparation.
CodingInterviewDataStructureJava
0 likes · 13 min read

This article walks through the evolution of MySQL index implementations—from hash tables and binary search trees to AVL, red‑black, B‑trees and finally B+ trees—explaining their performance trade‑offs, disk‑I/O considerations, and how InnoDB and MyISAM store data and indexes differently.
B+TreeDataStructureIndex
0 likes · 21 min read

LinkedHashMap extends HashMap by maintaining a doubly linked list to preserve insertion or access order, allowing optional LRU cache behavior via the accessOrder flag, and its source code shows how entries are linked, reordered on get, and how to override removeEldestEntry for eviction.
AccessOrderDataStructureHashMap
0 likes · 8 min read

This article explains how Java's HashMap stores key‑value pairs, details the hash calculation, index mapping, collision handling via linked lists, the role of load factor, resizing mechanics, and provides annotated source code for core methods such as put, get, and internal Entry class.
CollisionDataStructureHashMap
0 likes · 21 min read

This article introduces Java's ArrayList as a dynamic array implementation, explains its non‑thread‑safe nature, details its constructors, capacity‑growth strategy, key methods such as ensureCapacity, add, remove, toArray, and examines the underlying source code including array copying utilities.
DataStructureGenericsJava
0 likes · 13 min read

This article explains the design and implementation of Java's LinkedBlockingDeque, covering its internal doubly‑linked list structure, key fields, constructors, core methods for adding, removing, and traversing elements, and provides a multithreaded example that demonstrates its thread‑safety compared to non‑concurrent collections.
ConcurrentQueueDataStructureJava
0 likes · 15 min read

This article provides a comprehensive overview of Java's LinkedBlockingQueue, covering its FIFO behavior, internal linked‑list structure, concurrency controls with separate put and take locks, detailed method implementations, and a multithreaded example demonstrating safe usage versus non‑thread‑safe alternatives.
BlockingQueueConcurrencyDataStructure
0 likes · 14 min read

This article explains the design, thread‑safety mechanisms, internal data structures, and core methods of Java's ArrayBlockingQueue, illustrating its creation, insertion, removal, and iteration with detailed code examples and a practical multithreaded demo.
ArrayBlockingQueueBlockingQueueConcurrency
0 likes · 13 min read

This article explains how Java’s PriorityBlockingQueue implements a priority‑based unbounded blocking queue using a binary heap, covering heap structure, insertion and removal algorithms, underlying ReentrantLock synchronization, and key source code snippets that illustrate the sift‑up, sift‑down, and growth mechanisms.
BinaryHeapConcurrencyDataStructure
0 likes · 16 min read

This article explains the SkipList data structure, its characteristics and operations, and shows how Java’s ConcurrentSkipListMap implements a thread‑safe map using SkipList nodes, index layers, random level generation, and lock‑free algorithms for put, get, remove and size operations.
ConcurrentProgrammingConcurrentSkipListMapDataStructure
0 likes · 21 min read
