Tagged articles
15 articles
Page 1 of 1
Selected Java Interview Questions
Selected Java Interview Questions
Apr 18, 2026 · Backend Development

Efficient Hierarchical Menu Storage in MySQL: Adjacency List vs Closure Table

The article examines common pitfalls of using a simple parent_id column for menu hierarchies, compares three storage models—adjacency list, path enumeration, and closure table—shows their trade‑offs, and provides a SpringBoot/MyBatis‑Plus implementation that combines adjacency and closure tables for optimal read‑write performance.

Adjacency ListBackendClosure Table
0 likes · 14 min read
Efficient Hierarchical Menu Storage in MySQL: Adjacency List vs Closure Table
Top Architect
Top Architect
Aug 22, 2024 · Backend Development

Implementing a Generic Tree Conversion Utility in Java

This article explains how to design a flexible TreeNode interface and a TreeUtil class in Java that convert flat collections into hierarchical tree structures, provides multiple static methods for object and JSON tree generation, and discusses optimization techniques for large data sets.

Data StructuresJavaTree Structure
0 likes · 10 min read
Implementing a Generic Tree Conversion Utility in Java
Java Architect Essentials
Java Architect Essentials
Jul 19, 2024 · Backend Development

Unified TreeNode Utility Class for Multi‑Level Menus, Comments, Departments, and Categories in SpringBoot

This article explains how to create a unified SpringBoot utility class that builds hierarchical structures such as multi‑level menus, comments, departments, and categories, discusses database design choices like the optional tree_path field, provides a detailed ITreeNode interface, implementation of TreeNodeUtil with code examples, and demonstrates testing and filtering scenarios.

Backend DevelopmentJavaMulti-level Menu
0 likes · 12 min read
Unified TreeNode Utility Class for Multi‑Level Menus, Comments, Departments, and Categories in SpringBoot
Architecture Digest
Architecture Digest
Jan 19, 2024 · Backend Development

Assembling Hierarchical Tree Structures with Java Streams, Caching and Message Queues

This article demonstrates how to efficiently build department and regional hierarchical trees in Java by fetching all records in a single database query, using Stream API, Lambda expressions, in‑memory grouping, Redis caching and RocketMQ for asynchronous updates, achieving sub‑second response times even with tens of thousands of nodes.

BackendJavaRocketMQ
0 likes · 11 min read
Assembling Hierarchical Tree Structures with Java Streams, Caching and Message Queues
37 Interactive Technology Team
37 Interactive Technology Team
Nov 21, 2022 · Mobile Development

Red Dot Counter Implementation in a Mobile App

The article explains how to implement a red‑dot badge system in the “玩心部落” mobile app using a tree‑structured RedPoint hierarchy combined with the Observer pattern, where each node tracks its count, notifies UI observers, propagates updates to parent nodes, and is managed centrally by a HeadRedPoint singleton for easy extension.

JavaMobile DevelopmentObserver Pattern
0 likes · 12 min read
Red Dot Counter Implementation in a Mobile App
Programmer DD
Programmer DD
Apr 16, 2022 · Databases

Mastering MySQL Hierarchical Queries with the Nested Set Model

This article explains how to replace inefficient recursive MySQL tree queries with the nested‑set (preorder traversal) technique, covering descendant retrieval, subtree counting, leaf detection, insertion, deletion, direct‑child lookup, ancestor path queries, and a JavaScript example for building a tree structure.

Database designHierarchical QuerySQL
0 likes · 12 min read
Mastering MySQL Hierarchical Queries with the Nested Set Model
Selected Java Interview Questions
Selected Java Interview Questions
Apr 14, 2022 · Backend Development

Converting a List to a Tree Structure Using Java 8 Streams

This article demonstrates how to transform a flat list into a hierarchical tree structure in Java by defining a NodeVO class, implementing a recursive Stream‑based conversion method, and testing it with sample data, showcasing the elegance of the Stream API over traditional loops.

Backend DevelopmentStream APITree Structure
0 likes · 4 min read
Converting a List to a Tree Structure Using Java 8 Streams
Top Architect
Top Architect
Apr 9, 2022 · Databases

Applying the Nested Set Model for Hierarchical Department Queries in MySQL

This article explains how to use the nested set (left‑right) model to efficiently query, count, and manipulate hierarchical department data in MySQL, providing SQL examples for retrieving descendants, ancestors, leaf detection, as well as insert, delete, and JavaScript tree‑building techniques.

Nested Set ModelSQLTree Structure
0 likes · 11 min read
Applying the Nested Set Model for Hierarchical Department Queries in MySQL
Java Captain
Java Captain
Mar 12, 2022 · Backend Development

Building a Tree Structure from a Flat List Using Java 8 Streams

This article demonstrates how to retrieve flat menu data from a database into a List, then use Java 8 Stream operations and recursive methods to assemble a hierarchical tree structure, printing the result as JSON for verification.

BackendJavaRecursion
0 likes · 4 min read
Building a Tree Structure from a Flat List Using Java 8 Streams
Youku Technology
Youku Technology
Feb 28, 2022 · Artificial Intelligence

Seq2Path: Generating Sentiment Tuples as Paths of a Tree

Seq2Path treats each sentiment tuple as an independent tree path, training with average path loss and decoding via constrained beam search with a discriminative token, achieving state‑of‑the‑art results on five aspect‑based sentiment analysis datasets and deployment in Alibaba Entertainment AI Brain.

ACLBeam SearchInformation Extraction
0 likes · 3 min read
Seq2Path: Generating Sentiment Tuples as Paths of a Tree
Selected Java Interview Questions
Selected Java Interview Questions
Sep 19, 2021 · Backend Development

Designing a Multi‑Level Workflow Engine: From Simple Chains to Complex Conditional and Parallel Nodes

This article walks through the step‑by‑step design of a workflow engine, starting with a basic approval chain and progressively adding countersign, parallel, conditional, delegation, timeout, scripting, and progress‑tracking features, illustrating a tree‑based architecture and node‑state management.

DesignNodeTree Structure
0 likes · 12 min read
Designing a Multi‑Level Workflow Engine: From Simple Chains to Complex Conditional and Parallel Nodes
ZhiKe AI
ZhiKe AI
May 8, 2021 · Fundamentals

A Reusable Java Utility for Building Tree Structures

This article shares a generic Java utility class that recursively constructs hierarchical tree structures from a flat list by using functional interfaces to identify parent‑child relationships, optionally sorting nodes, and providing a flexible way to set child collections.

CollectionsGenericsJava
0 likes · 4 min read
A Reusable Java Utility for Building Tree Structures
MaoDou Frontend Team
MaoDou Frontend Team
May 21, 2019 · Fundamentals

Mastering the Composite Pattern: Tree Structures and Real‑World Examples

This article explains the Composite design pattern, detailing its definition, benefits, and implementation through JavaScript examples such as a startup command sequence and an employee‑department hierarchy, while highlighting key considerations, common pitfalls, and best practices for effective use.

Software ArchitectureTree Structurecomposite pattern
0 likes · 9 min read
Mastering the Composite Pattern: Tree Structures and Real‑World Examples
dbaplus Community
dbaplus Community
Mar 13, 2017 · Artificial Intelligence

Unlocking Tree‑Structured Data: A Deep Dive into Recursive Neural Networks and BPTS

Recursive Neural Networks (RNN) extend deep learning to tree and graph structures, using Back‑Propagation Through Structure (BPTS) for training; this article explains their theory, forward and backward computations, implementation details, code snippets, and applications in natural language and scene parsing, while noting practical challenges.

BPTSDeep LearningRecursive Neural Network
0 likes · 15 min read
Unlocking Tree‑Structured Data: A Deep Dive into Recursive Neural Networks and BPTS