TRT
Sign in

topic / algorithms

Algorithms

How algorithms and data structures spend time and memory, explained from zero.

Start from your first array and pointer and grow toward hash tables, trees, graphs, and modern C++ memory tools. Every idea ties to the costs the machine pays: comparisons, memory accesses, allocations, and cache misses.

  • 13 articles
  • 0 videos
  • 8 traces
  • 7 flows
  • 1 interviews
  • 29 total

Articles

algorithms

C++ Concurrency: Threads and Atomics

Learn how std::thread, std::mutex, and std::atomic share work safely, with the same programs in C++, Java, and Python.

4 min readRead article
algorithms

Move Semantics and Rvalue References

How std::move and rvalue references transfer ownership instead of copying, and when move constructors run.

4 min readRead article
algorithms

RAII and Smart Pointers

How Resource Acquisition Is Initialization prevents memory leaks, and how unique_ptr, shared_ptr, and weak_ptr manage ownership.

4 min readRead article
algorithms

Recursion: Functions Calling Themselves

How a function can solve a problem by delegating a smaller version of the same problem to itself, the call stack, and common pitfalls.

9 min readRead article
algorithms

Stack vs Heap: Where Memory Lives

Understand the difference between stack memory (fast, automatic) and heap memory (dynamic allocation), and when to use each.

4 min readRead article
algorithms

STL Containers and Algorithms

How std::vector, std::map, std::unordered_map, iterators, and the standard algorithm functions fit together, with code in three languages.

3 min readRead article
algorithms

Algorithms Are Procedures With Costs

Learn to connect an algorithm's correctness argument to the comparisons, branches, and memory accesses it performs.

7 min readRead article
algorithms

Arrays and Linked Lists: Cost Follows Access Pattern

Compare arrays and linked lists by memory layout, indexing cost, insertion cost, and cache behavior, with concrete numbers.

5 min readRead article
algorithms

A Practical Method for Analyzing Algorithms

An analysis begins by naming the input size and the operation whose growth matters.

5 min readRead article
algorithms

Representing a Graph Before Traversing It

Learn how vertices and edges model relationships, how to pick adjacency lists or matrices, and how BFS, DFS, and Dijkstra differ.

5 min readRead article
algorithms

Hash Tables: From Keys to Buckets

How hash tables turn keys into bucket positions, handle collisions, and stay fast through resizing, with concrete numbers.

5 min readRead article
algorithms

Choosing a Search or Sorting Strategy

Search and sorting choices depend on what is already known about the data and what operations the product needs.

5 min readRead article
algorithms

Trees and Heaps Solve Different Ordering Problems

Learn how search trees keep keys ordered in O(log n) height and how heaps expose the extreme element in O(1), with code in three languages.

5 min readRead article

Request flows

Videos

// empty

No videos yet

Video coverage for this topic is planned. Watch the library page for updates.

Browse videos

Traces

Interviews

Explore adjacent