AI Agent Hub

Blog

In-depth articles on AI agents, LLM engineering, servers, Python and software development.

📝
Insertion Sort: How Does Insertion Sort Work? A Comparison with Bubble Sort
Dec 20, 2025 · Data Structure

This article introduces the fundamental importance of sorting and focuses on two simple sorting algorithms: Insertion Sort and Bubble Sort. Insertion Sort works by gradually building a sorted seque

463 views
📝
Binary Search: Applicable Scenarios and Learning Guide for Beginners
Dec 20, 2025 · Data Structure

This article introduces the binary search algorithm, whose core is to compare the middle element in an ordered array to gradually narrow down the search range and quickly locate the target. It is suit

# Binary Search # Introduction to Algorithms # Python Algorithms 546 views
📝
Adjacency Matrix: Another Representation Method for Graphs and a Comparison of Advantages and Disadvantages
Dec 20, 2025 · Data Structure

An adjacency matrix is a fundamental representation of a graph, essentially an n×n two-dimensional array where rows and columns correspond to the vertices of the graph, and element values indicate the

# adjacency matrix # Figure Data Structure # Advantages and disadvantages of adjacency matrix 619 views
📝
Union-Find: What is Union-Find? A Method to Solve "Friendship" Problems
Dec 20, 2025 · Data Structure

Union-Find (Disjoint Set Union, DSU) is an efficient data structure for managing element groups, primarily solving the "Union" (merge groups) and "Find" (check if elements belong to the same group) pr

# disjoint-set # Union-Find # Data Structure 510 views
📝
Prefix Sum: How to Quickly Calculate Interval Sum Using Prefix Sum Array?
Dec 20, 2025 · Data Structure

The prefix sum array is an auxiliary array used to quickly calculate the sum of intervals. It is defined as follows: for the original array A, the prefix sum array S has S[0] = 0, and for k ≥ 1, S[k]

# Prefixes and arrays # Interval and Calculation # Data Structure 514 views
📝
Dynamic Programming: An Introduction to Dynamic Programming and Efficient Solutions for the Fibonacci Sequence
Dec 20, 2025 · Data Structure

The Fibonacci sequence is defined as f(0) = 0, f(1) = 1, and for n > 1, f(n) = f(n-1) + f(n-2). When calculated directly with recursion, the time complexity is O(2^n) due to excessive repeated computa

# Introduction to Dynamic Programming # Fibonacci sequence # Efficient solution 532 views
📝
Balanced Binary Trees: Why Balance Is Needed and A Simple Explanation of Rotation Operations
Dec 20, 2025 · Data Structure

Binary Search Trees (BST) may degenerate into linked lists due to extreme insertions, causing operation complexity to rise to O(n). Balanced binary trees control balance through the **balance factor**

# balanced binary tree # AVL tree # Rotation operation 505 views
📝
Figure: A Beginner's Guide to the Basic Concepts and Adjacency List Representation of Graphs
Dec 20, 2025 · Data Structure

A graph consists of vertices (nodes) and edges (connections). Vertices are the basic units, and edges can be directed (digraph) or undirected. Weighted graphs have edges with weights (e.g., distances)

# Basic concepts of graphs # adjacency list # Data Structure 605 views
📝
Heap: Structure and Applications, Introduction to Min-Heap and Max-Heap
Dec 20, 2025 · Data Structure

A heap is a special type of complete binary tree, characterized by the size relationship between parent and child nodes (parent ≤ child for a min-heap, parent ≥ child for a max-heap). It efficiently r

# Heap Data Structure # min heap # Max Heap 763 views
📝
Greedy Algorithm: What is the Greedy Algorithm? A Case Study on the Coin Change Problem
Dec 20, 2025 · Data Structure

Greedy algorithm is an algorithm that makes the optimal choice (local optimum) at each step in the hope of achieving a global optimum. Its core is to satisfy the "greedy choice property"—that the loca

# Greedy algorithm # Change-making problem # Algorithm Design 512 views