Tagged articles
data structure
77 articles · Page 1 of 1

liandkAug 26, 2026 · Fundamentals
This article explains arrays using a locker analogy, outlines their core characteristics and typical use cases, provides a complete Python example for basic operations with output, and highlights common beginner pitfalls such as zero‑based indexing and fixed length.
AlgorithmPythonarray
0 likes · 4 min read

An in‑depth guide walks through the business background, modular decomposition, sequence diagram, and data‑structure design of payment systems, illustrating how to manage account balances, transaction logs, third‑party integration, and order models while addressing transaction consistency, locking, retries, and settlement accuracy.
backend developmentdata structurepayment
0 likes · 10 min read

The author details how a month‑long personal project uses HTML Canvas to implement a fully functional resume editor, covering custom data structures, undo/redo history, layered rendering, event handling, focus management, infinite canvas support, performance tricks, and future enhancements.
CanvasFrontend DevelopmentResume Editor
0 likes · 15 min read

This article explains how the C++ deque combines the random‑access speed of a vector with the constant‑time double‑ended insertions of a list by using a segmented storage architecture, detailing its internal map, iterator mechanics, core operations, performance comparisons, practical use cases, and common pitfalls.
AlgorithmC++data structure
0 likes · 47 min read

Explore the principles behind Least Recently Used (LRU) caching, understand why it outperforms FIFO and LFU strategies, and follow a step‑by‑step C++ implementation using hash tables and doubly linked lists, complete with detailed code, testing, and performance optimization tips.
C++CacheLRUCache
0 likes · 24 min read

This article explores the motivations, architectural choices, zero‑width character handling, data‑structure design, and implementation strategies—including execCommand, ContentEditable, and Canvas approaches—for creating a custom rich‑text editor that balances flexibility, performance, and browser compatibility.
contenteditabledata structurerich-text-editor
0 likes · 29 min read

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.
BackendHashMapJava
0 likes · 6 min read

This article explains the principles of queues and stacks, demonstrates how to simulate a FIFO queue using two LIFO stacks in PHP, provides full source code, usage examples, complexity analysis, and discusses practical applications and possible extensions.
AlgorithmComplexityPHP
0 likes · 5 min read

This article introduces Python tuples, explaining their immutable ordered nature, core characteristics, and provides eleven practical code examples ranging from basic definition and indexing to unpacking, concatenation, using tuples as dictionary keys, and converting them to lists, illustrating common use cases and best practices.
Immutablecodingdata structure
0 likes · 8 min read

This article explains the Linux kernel bitmap data structure, its definition, macro-based declarations, related assembly instructions, core bitmap APIs such as set_bit and test_bit, various bit‑operation functions, and practical applications ranging from PID allocation to device management and file‑system indexing.
BitmapLinuxbit operations
0 likes · 27 min read

This article explains how a Fenwick (Binary Indexed) Tree stores prefix sums using binary representations and the least‑significant‑bit trick, shows concrete examples for computing sums of sub‑arrays, and provides a full Python implementation with update and query operations.
AlgorithmBinary Indexed TreeFenwick tree
0 likes · 9 min read

This article explains the internal architecture of Java's HashMap, covering its array of buckets, linked‑list handling of hash collisions, and the conversion to red‑black trees for high‑collision scenarios, supplemented with code examples and visual diagrams.
HashMapJavaRed-Black Tree
0 likes · 5 min read

This article explains the differences between array‑based sequential storage and pointer‑based linked storage, introduces singly, doubly and circular linked lists, and provides complete C implementations for creation, insertion, deletion, and traversal with clear diagrams and step‑by‑step code examples.
AlgorithmC++array
0 likes · 25 min read

This article explains how to use a Trie data structure in Go to efficiently store API paths with associated permissions, insert paths, perform fast permission validation, and demonstrates the approach with a complete, runnable code example and sample test cases.
APIBackendGo
0 likes · 9 min read

This article introduces the Trie (prefix tree) data structure, explains its basic architecture, demonstrates insertion, search, and deletion operations with complete Go implementations, and provides practical unit tests and real‑world applications such as autocomplete, spell checking, and IP routing.
GoPrefix TreeTrie
0 likes · 10 min read

A whimsical yet technical dialogue among Go, C++, Python, Java, and C# representatives reveals the storage structures, collision‑resolution strategies, hash‑to‑index mapping techniques, and resizing policies used in their hash table implementations, highlighting trade‑offs and design choices.
capacitycollision-resolutiondata structure
0 likes · 9 min read

This article explains how to construct hierarchical tree data in Java without using recursion by adapting the non‑recursive algorithm from the zTree jQuery plugin, detailing the underlying hash‑map approach, providing full Java code, and discussing performance benefits and limitations.
AlgorithmHashMapJava
0 likes · 12 min read

This article explains the concept of a prefix tree (Trie), demonstrates how to build and use it for prefix searches, insertions, and deletions, and provides a complete Java implementation with detailed examples and visual illustrations.
JavaPrefix TreeTrie
0 likes · 9 min read

This article explains Java's HashMap implementation, covering its underlying array‑plus‑linked‑list (and tree) data structure, the hash function with bit‑mixing, collision handling via chaining, and the dynamic resizing mechanism triggered by load factor thresholds.
HashMapcollision handlingdata structure
0 likes · 5 min read

Bloom filters are space‑efficient probabilistic structures that test set membership using multiple hash functions, offering fast, low‑memory checks with a controllable false‑positive rate, and can be implemented manually in Java, via Guava’s library, or deployed at scale with RedisBloom for distributed applications.
Bloom FilterGuavaJava
0 likes · 14 min read

This article walks through implementing a Redis‑compatible sorted‑set in Go, covering requirement analysis, data‑structure design with a map and skiplist, detailed insertion and search algorithms, complete code examples, and edge‑case handling, all illustrated with diagrams and sample output.
BackendGoSorted Set
0 likes · 13 min read

The article explains the differences between data schemas, data structures, and data models, proposes a systematic naming approach, and outlines a five‑schema architecture—including business, view, logical, deployment, and physical schemas—while addressing terminology challenges and normalization processes.
Data Modelingdata schemadata structure
0 likes · 12 min read

This article explains what Python dictionaries are, how they are implemented using hash tables, their key characteristics, various ways to create and access them, how to perform add, delete, and update operations, view their contents, and use dictionary comprehensions for concise construction.
CRUDPythoncomprehension
0 likes · 13 min read

This article explains the Redis Sorted Set data type, its underlying storage mechanisms (listpack and skiplist + dict), the internal structures and algorithms, and demonstrates how to build a real‑time game leaderboard using ZADD, ZRANGE and ZREVRANK commands.
LeaderboardListpackSorted Set
0 likes · 14 min read

The article explains Redis’s set and sorted‑set data structures, detailing how sets use intset or hashtable encodings and how sorted sets employ skiplist or ziplist encodings, including the conditions for each encoding, the underlying C structs, upgrade processes, and common Redis commands.
Sorted Setdata structuredatabase
0 likes · 22 min read

This article explains the Bloom filter data structure, its space‑efficient probabilistic nature, common scenarios such as cache‑bypass and URL deduplication, and provides practical Java Guava and Redis module implementations with code examples.
Bloom FilterGuavaJava
0 likes · 9 min read

This article explains the inner workings of Redis Hashes, covering the dict and listpack storage mechanisms, memory‑optimizing conditions, rehashing strategies, and the underlying C structures that enable fast O(1) field lookups and efficient memory usage.
BackendC++Hash
0 likes · 11 min read

This article explores Bloom filters—how they efficiently test set membership, their underlying principles, error rates, and practical usage in Java via Guava and Redisson, including code examples, configuration tips, handling cache penetration, and strategies for element deletion and periodic rebuilding.
Bloom FilterCacheGuava
0 likes · 18 min read

This article explains the internal structure of Java’s HashMap across JDK 7 and JDK 8, covering its array‑based storage, linked‑list and red‑black‑tree collision handling, resizing mechanics, load factor choices, power‑of‑two capacity growth, and thread‑safety concerns with practical solutions.
HashMapJDK8Java
0 likes · 11 min read

This article introduces Redis List as a linked collection of strings, explains its size limits, common CRUD commands, read operations, and dives into the underlying encodings—ZIPLIST, LINKEDLIST, and the hybrid QUICKLIST—highlighting when each is used.
Listcommandsdata structure
0 likes · 8 min read

stl4go provides a generic Go 1.18 container library that implements an optimized skip‑list‑based ordered map, using adaptive levels, efficient random‑level generation, type‑specific paths, and cache‑friendly node structures to achieve near‑C++ performance, surpassing existing Go generic collections.
AlgorithmGenericsGo
0 likes · 18 min read

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.
CollisionHashMapdata structure
0 likes · 20 min read

This article explains the design and Java implementation of an LRU (Least Recently Used) cache that achieves O(1) time complexity for get and put operations by combining a doubly linked list with a hash map, and provides full source code and usage examples.
JavaLRU cacheO(1)
0 likes · 10 min read

The article explains perfect hash functions, their collision‑free construction methods such as FCH, CHD, and PTHash, compares them to conventional hash tables, reviews common and cryptographic hash functions, and shows how read‑only perfect‑hash maps deliver faster lookups and lower memory use for static key sets.
Algorithmbenchmarkdata structure
0 likes · 21 min read

The article analyzes the memory inefficiency of storing per‑user read/unread lists for group chat messages, proposes a bitmap‑based solution with user‑to‑map ID mapping, discusses handling of member exits, and evaluates the storage savings and scalability of the new design.
Bitmapbackend designdata structure
0 likes · 7 min read

This article explains Redis bitmap (bit) operations, covering command syntax for SETBIT, GETBIT, BITCOUNT, and BITOP, analyzing the underlying SDS data structure, detailing time‑complexity and storage calculations, and presenting practical application scenarios such as user sign‑in tracking and online status monitoring.
BITCOUNTBITOPBitmap
0 likes · 8 min read

This article explains the internal structure of Java's HashMap and ConcurrentHashMap, covering hash calculation, bucket handling, load factor, resizing, collision resolution with linked lists and red‑black trees, and the differences in thread‑safety and performance between these map implementations.
ConcurrencyConcurrentHashMapHashMap
0 likes · 12 min read

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.
HashMapJDKJava
0 likes · 17 min read

This article explains the concept of skip lists as an ordered random data structure, illustrates how Redis uses skip lists for sorted sets, and provides a complete Java implementation with detailed code examples and analysis of their performance characteristics.
AlgorithmJavaSkip List
0 likes · 13 min read

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.
CollisionHashMapJava
0 likes · 22 min read

This article explains the design principles, lock mechanisms, CAS operations, and resizing strategies of Java's ConcurrentHashMap, illustrating how it achieves thread safety and high concurrency compared to HashMap and Hashtable in modern Java applications.
CASConcurrentHashMapdata structure
0 likes · 19 min read

This article explains how Redis implements its Sorted‑Set data type by starting from a basic ordered singly linked list, analyzing its insertion and query complexities, introducing the skiplist structure, deriving its O(log N) performance, and detailing the underlying C source code for creation, insertion, lookup, and deletion.
C++Sorted Setdata structure
0 likes · 32 min read

This article introduces Bloom filters—a space‑efficient probabilistic data structure—for fast set membership testing, explains their underlying hash‑based mechanism, showcases Java implementation with Google Guava, and demonstrates their application in scenarios such as cache‑penetration protection.
Bloom FilterCacheGuava
0 likes · 7 min read

This article explains Redis's ziplist—a compact list implementation used for small integers and short strings—detailing its memory layout, header fields, entry encoding, previous_entry handling, and the cascade update mechanism that occurs when node sizes change.
data structureencodingmemory optimization
0 likes · 7 min read

The article explains that Python dictionaries are hash tables with average O(1) lookup, describes how their internal structure changed in Python 3.6 to separate indices and entries, resulting in ordered iteration and significant memory savings.
Pythondata structurehash table
0 likes · 5 min read

The article analyzes the memory inefficiency of storing per‑message read/unread user lists in large group chats and proposes a bitmap‑based solution that maps users to sequential IDs, uses compact bitmaps for read status and handles member exits, achieving over 95% storage reduction.
Bitmapdata structuregroup chat
0 likes · 6 min read

This article dissects Java’s HashMap implementation, covering lazy initialization, the put workflow, hash mixing, bucket conversion to red‑black trees, core helper methods, removal logic, thread‑safety considerations, and practical usage tips, all illustrated with source excerpts.
ConcurrencyHashMapJava
0 likes · 31 min read

This article explains the role and data structure of Memtable in LevelDB, introduces the probabilistic SkipList design, analyzes its time and space complexities, and provides a full Java implementation of a SkipListMap with code examples and a brief look at LevelDB's own SkipList implementation.
AlgorithmJavaLevelDB
0 likes · 17 min read

This article explains Redis's Simple Dynamic String (SDS) data structure, its internal layout, how it differs from traditional C strings, and the performance, memory‑reallocation, and data‑format benefits it brings to Redis's key‑value storage.
C++SDSString
0 likes · 8 min read

This article explains the LRU cache eviction algorithm, its core principle, real‑world applications in Redis and MySQL, compares naive array and linked‑list solutions, and provides a complete O(1) doubly‑linked‑list‑plus‑hash‑map implementation in Python for interview preparation.
CacheInterviewLRU
0 likes · 14 min read

The article discusses methods for teaching circuit fault diagnosis in a classroom setting, focusing on modeling circuit components as edges and using a linked list to manage break points dynamically.
Classroom LearningPhysicsdata structure
0 likes · 5 min read

This article demonstrates how to transform a flat array into a hierarchical tree structure and reverse the process in PHP, providing step‑by‑step code examples for building a tree using parent‑child relationships and converting the tree back into a flat list.
Array to TreePHPRecursive Function
0 likes · 3 min read

Redis sorted sets (zsets) combine a hash table with a skiplist that provides O(log N) search, insertion, and deletion, using forward, backward, and span pointers to maintain element order and rank, enabling fast score‑based queries, leaderboards, and range operations via commands such as ZADD, ZRANK, and ZRANGE.
Sorted Setc-programmingdata structure
0 likes · 15 min read

This article explains the bitmap concept, demonstrates how to store and query billions of integers using bitwise operations, introduces BitSet and Bloom Filter implementations, and provides practical Java code snippets for adding, removing, and checking elements while highlighting their memory‑saving advantages.
BitmapBitsetBloom Filter
0 likes · 12 min read

This article explains the concept of FIFO queues, outlines their key properties, and provides three Java implementations—using an array, a linked list, and a List—complete with source code, usage examples, and typical application scenarios.
Array ImplementationJavaList
0 likes · 8 min read

This article explains the internal structure of Redis dictionaries, how elements are added, and how rehash-based resizing works, drawing parallels with Java's HashMap to help interviewees answer related questions effectively in technical interviews.
HashMapRehashdata structure
0 likes · 9 min read

The article explains how Kafka implements a hierarchical time‑wheel—a ring of bucket sets with a map for O(1) insertion, removal and expiration—to replace costly per‑tick scans, enabling efficient management of millions of delayed tasks across multiple timeout layers.
BackendKafkadata structure
0 likes · 16 min read

This article explains the internal structure and algorithms of Java’s HashMap, covering its array‑based storage, collision handling with linked lists and red‑black trees, key methods like put, get, resize, and thread‑safety considerations, complete with code examples and diagrams.
AlgorithmHashMapJava
0 likes · 30 min read

This article explains the meaning of "stack" in Java, examines the JDK's Stack class implementation—including its inheritance from Vector and core methods—provides full source code, demonstrates array manipulation with System.arraycopy, and explores common stack applications such as browser navigation, function call stacks, and complexity analysis.
JDKJavaarray
0 likes · 8 min read

This article explains the PNG image format, covering its full name, lossless compression, size advantages, transparency support, the three main PNG types, the file’s chunk‑based data structure, hexadecimal header details, factors that affect compression efficiency, and the two‑stage prediction‑and‑deflate compression process.
DeflateLZ77PNG
0 likes · 10 min read

This article explains the internal structure and behavior of Java's HashMap, covering its node and tree node classes, default parameters, hash calculation, resizing mechanism, and the conditions under which linked lists are transformed into red‑black trees, along with code examples and performance considerations.
HashMapJavaRed-Black Tree
0 likes · 22 min read

This article explains the internal structure and working principles of Java's HashMap and ConcurrentHashMap, covering hash calculations, collision handling, resizing, the transition to red‑black trees, differences with TreeMap, LinkedHashMap, Hashtable, and performance‑related lock mechanisms in JDK 7 and JDK 8.
ConcurrentHashMapHashMapJDK
0 likes · 14 min read

The article explains how to formally name data schemas, data structures, and data models, clarifies their relationships, introduces physical, business, logical, and deployment schemas, and proposes strategic and tactical schemas to improve data architecture and management across organizations.
Data ModelingInformation Architecturedata schema
0 likes · 11 min read

This article explains why Java's HashMap is inherently thread‑unsafe, detailing how JDK 1.7’s resize operation can create circular linked lists and data loss, while JDK 1.8’s insertion logic can cause overwrites, and provides code examples and step‑by‑step analysis.
HashMapJDK1.7JDK1.8
0 likes · 10 min read

This article provides a thorough introduction to heap data structures, covering their definition, core operations such as insertion and deletion, heap sort implementation, and practical production use cases like priority queues, Top‑K queries, and TP99 calculation, all illustrated with Java code examples.
AlgorithmHeapJava
0 likes · 17 min read

This article provides an in‑depth explanation of Java's HashMap, covering its array‑plus‑linked‑list (and tree) structure, default capacity and load factor, constructors, put/get workflows, concurrency pitfalls, differences between Java 7 and 8, and key points to ace interview questions.
ConcurrencyHashMapInterview
0 likes · 8 min read

This article explains the PNG image format, covering its lossless compression, different PNG types (8, 24, 32), internal data structure, how prediction and Deflate compression work, and tips for achieving better compression by using simple, low‑color images.
CompressionGraphicsPNG
0 likes · 9 min read

This article explains the balanced binary search tree known as a red‑black tree, detailing its five defining properties, illustrating insertion examples that maintain balance, and describing left and right rotation operations with visual aids to help readers grasp the underlying algorithms.
AlgorithmsRed-Black TreeTree Rotations
0 likes · 4 min read

This article explains Redis string basics, its mutable SDS implementation, common commands, internal memory layout, and the three encoding formats (int, embstr, raw) that determine how strings are stored and optimized in the database.
SDSStringdata structure
0 likes · 8 min read

This article explains how to use a trie (prefix tree) to efficiently filter sensitive words in a text, covering the basic concepts, construction steps, traversal algorithm, complexity analysis, and a Java implementation using HashMap.
JavaSensitive Word FilteringTrie
0 likes · 9 min read

This article explains what arrays are, how they enable O(1) random access through address calculation, the time‑complexities of insertion and deletion operations, techniques for improving array efficiency, and why zero‑based indexing is used, comparing arrays with dynamic containers like ArrayList.
AlgorithmInsertionarray
0 likes · 6 min read

This article explains the thread‑safe ConcurrentLinkedQueue in Java, covering its lock‑free linked‑list structure, core methods such as add, offer, and poll, detailed source‑code analysis, and a multithreaded example demonstrating its behavior in high‑concurrency scenarios.
ConcurrencyConcurrentLinkedQueueJava
0 likes · 12 min read

This article provides a comprehensive guide to Java's ConcurrentSkipListMap, covering its purpose as a thread‑safe ordered map, the underlying skip‑list data structure, a detailed list of its public methods, in‑depth source‑code analysis for add, remove, and get operations, and a multithreaded example demonstrating its correct behavior compared with TreeMap.
ConcurrencyConcurrentSkipListMapJava
0 likes · 20 min read

This article provides a comprehensive overview of Java's HashMap, covering its purpose as a key‑value store, the evolution of its internal data structures from JDK 1.7 to JDK 1.8, detailed explanations of core methods such as hash, put, get, resize, and practical example code illustrating common operations.
ConcurrencyHashMapJDK
0 likes · 18 min read

This article explains Java's HashMap implementation, covering its inheritance, thread‑safety options, key parameters such as initial capacity and load factor, internal array‑plus‑linked‑list structure, core source‑code snippets, and the algorithms for hashing, indexing, insertion, resizing, and iteration.
HashMapdata structure
0 likes · 25 min read

The article explains how to design a data‑driven architecture for a visual H5 page editor, detailing the abstraction of pages, elements, and history into structured objects, and showing how front‑end developers can map complex UI interactions to clean, editable data models.
H5Visual Editordata structure
0 likes · 14 min read

This article explains the concept of a stack as a LIFO data structure, shows how to implement a Stack class in JavaScript with essential methods like push, pop, size, empty, peek, and clear, and demonstrates practical usage through recursive and iterative factorial calculations.
AlgorithmJavaScriptTutorial
0 likes · 4 min read
