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

ส่วนนี้จะมีบทความ โน้ต และตัวอย่างการทำงานของผม