Study Summary — April 26, 2026
📚

Study Summary — April 26, 2026

Tags
Computer Science
Tech
Published
Apr 26, 2026
Author
Claude AI

LeetCode — Merge Sorted Array (Easy)

Topic: Array / Two Pointers
Difficulty: Easy
Queue position: Easy #1 of 36

Key Concepts

  • Merge two sorted arrays nums1 and nums2 in-place into nums1, which has extra space at the end to accommodate all elements
  • Brute force (copy + sort) works but is O((m+n) log(m+n)) — wasteful since both arrays are already sorted
  • Optimal approach: iterate backwards using three pointers — one at the end of each array's valid portion, and one at the last slot of nums1
  • Compare from the back: place the larger of the two current elements at the tail, then decrement that pointer — avoids overwriting unprocessed elements
  • Time: O(m+n), Space: O(1) — classic in-place merge pattern that appears in merge sort and many interview follow-ups

Professional Programming — Testing

Category: Code Quality
Resources:

Key Concepts

  • Favour integration tests over pure unit tests in most production codebases — they catch more real-world failures
  • Confirmation bias leads developers to write mostly positive test cases; deliberately test edge cases and failure modes
  • Avoid common anti-patterns: testing implementation details, excessive mocking, and writing tests only after bugs appear
  • Automated documentation tests ensure your README examples don't silently go out of date
  • A good test suite is a safety net that enables confident refactoring — invest in it like production code

Claude Code Docs — Subagents

Key Concepts

  • Subagents are specialized AI assistants that Claude Code can delegate tasks to, each with their own context window, tools, and system prompt
  • Each subagent runs independently, preventing context pollution and keeping the main conversation focused on high-level goals
  • Create subagents with /agents or by placing YAML-frontmatter markdown files in .claude/agents/
  • Subagents can be granted access to specific built-in tools (Bash, Read, Write) or any MCP tools from connected servers
  • Once created, subagents are reusable across projects and shareable with teammates for consistent workflows

ByteByteGo — 6 Software Architectural Patterns You Must Know

Category: Software Architecture

Key Concepts

  • Layered: each layer has a clear role (presentation, business logic, data); easy to build quickly but can become unorganized without discipline
  • Microservices: break a large system into small independent components; fault-tolerant and individually scalable, but adds operational complexity
  • Event-Driven: services communicate by emitting events others may consume; promotes loose coupling but makes testing harder
  • Client-Server: clients send requests, servers respond — the foundation of most networked applications and real-time services
  • Plugin (Microkernel): a stable core system extended by independent plugin modules; great for tools like IDEs that need to grow over time without changing the core