DSA

数据结构与算法

坚实的基础是可持续工程的关键。

Time complexity — how runtime scales with input (log scale, n = 1 → 100)

ntO(1)O(log n)O(n)O(n log n)O(n²)
O(1)O(log n)O(n)O(n log n)O(n²)
01

Prompt ≠ Program

LLMs suggest. Engineers decide what runs, when, and why. Correctness and safety still require human reasoning.

02

Efficiency Matters

A poorly designed agent loop burning O(n²) API calls in production will cost real money. Complexity awareness is a cost control.

03

Debugging Agents

When an agentic pipeline fails silently, you trace execution graphs, inspect state machines, and reason about concurrency — all DSA territory.

Classical algorithms powering modern AI systems

Sliding Window

Manages LLM context windows and streaming token buffers during inference.

k-Nearest Neighbor

Powers semantic similarity search in RAG pipelines and vector embeddings.

Graph Traversal

Agent task planning, dependency resolution, and multi-tool orchestration.

Dynamic Programming

Beam search decoding and optimal token sequence selection in LLMs.

Hash Maps + Tries

KV-cache systems, prompt deduplication, and fast token lookup tables.

Priority Queues

Multi-agent scheduling, LLM request batching, and rate-limit enforcement.

01

正确的数据结构帮助更快找到合适解法。

02

AI 是助手,但判断与权衡仍需要人。

03

这里会分享我的笔记、思考和实现。