Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 2.96 KB

File metadata and controls

61 lines (47 loc) · 2.96 KB

Agent Guide

This document captures the conventions we (and future contributors) follow while extending the Algorithms & Data Structures book. Refer to it before adding chapters, editing prose, or reorganizing folders.

Repository layout

  • Top-level chapters live in directories prefixed with a two-digit ordinal:
    • 01. Foundations of Algorithms
    • 02. Core Data Structures
    • 03. Algorithmic Techniques
    • 04. Interview Practice Playbook
    • 05. Appendices
  • Each chapter file is named NN-descriptive-title.md (e.g., 01-introduction-and-motivation.md) so listings stay naturally sorted.
  • Supporting guidance for contributors stays in the root (e.g., README.md, TODO.md, this file).

Adding or updating a chapter

  1. Pick the correct part directory and choose the next available NN- prefix.
  2. Start from the standard template below to keep structure consistent.
  3. Write content in clear, concise English; favour active voice and short paragraphs.
  4. Include Python snippets when code clarifies the idea. Prefer type hints and PEP 8 spacing.
  5. Cross-link related chapters with relative paths using URL-encoded spaces (e.g., 01.%20Foundations%20...).
  6. Update README.md and TODO.md when new chapters land or the roadmap changes.

Chapter template

# NN · Title Case Chapter Name

1–2 sentence hook introducing the concept.

## Learning objectives
- Bullet list of 3–5 goals phrased as outcomes (“Explain…”, “Implement…”, “Compare…”).

## Core ideas / Why it matters
Short paragraphs describing the problem space, when the topic appears, and important trade-offs.

## Worked example
Python snippet (or pseudocode if language-agnostic) with inline comments where necessary.

## Interview checkpoints
- 2–4 bullet points highlighting what interviewers expect you to articulate.

## Further practice / Next steps
Pointers to adjacent chapters, external resources, or practice prompts.

Adapt the section headings slightly when it improves clarity (e.g., “Case study”, “Quick reference”), but keep the Learning objectives and Interview checkpoints sections present in every chapter.

Language and formatting

  • Use ASCII characters unless content requires otherwise.
  • Wrap long lists at ~80–90 characters; leave a blank line between headings and body text.
  • Use backticks for inline code references and fenced code blocks with an info string (e.g., ```python).
  • Proofread for spelling, grammar, and consistent terminology (“Big-O”, “time complexity”, etc.).

Review checklist

  • Folder and file names follow the numbered convention.
  • Chapter respects the template and tone.
  • Code samples run under Python 3.11 (if executable).
  • Internal links resolve (verify via Markdown preview or markdown-link-check if available).
  • README.md reflects the new/updated chapter.
  • TODO.md updated if roadmap changes.

Keeping these rules tight ensures the book reads like a cohesive resource even as it grows.