C++ Functions, References, and Pass-By-Value
Write C++ functions that pass data correctly: by value, by reference, by const reference, with overloading, default arguments, and clear ownership.
1745 posts · page 30 of 37
Write C++ functions that pass data correctly: by value, by reference, by const reference, with overloading, default arguments, and clear ownership.
Tour the modern C++ features that pay back every day: auto, range-for, structured bindings, if-init, std::optional, and string_view.
Learn C++ pointers, the stack vs the heap, new and delete, nullptr, pointer arithmetic, and why modern C++ pushes you toward smart pointers.
Use unique_ptr, shared_ptr, and weak_ptr to model ownership in modern C++ without manual new and delete or memory leaks.
Pick the right C++ STL container for the job: vector, deque, list, map, set, unordered_map, and unordered_set with their complexity guarantees.
Learn C++ templates from scratch: function templates, class templates, type deduction, specialization, and how the compiler stamps out concrete code.
Understand C++ fundamental types, fixed-width integers, floating point, char, bool, const, and how initialization actually works in modern C++.
STAR is the most-recommended behavioral interview format and the most-misused. Here is how to actually use it without sounding rehearsed or robotic.
Code reviews shape engineering culture more than any other ritual. Here is how to do them well as both the author and the reviewer.
Most first-time open source PRs never get merged. Here is how to pick the right project, the right issue, and ship something real that maintainers will actually accept.
Going freelance is more business than code. Here is a candid guide to finding clients, pricing your work, scoping projects, and not getting burned.
First offer in hand and afraid to ask for more? Here is a candid guide to negotiating without sounding greedy, losing the offer, or selling yourself short.
On-call is part of the job for most production engineers. Here is how to survive your first rotation, sleep better, and come out a stronger engineer.
A practical roadmap to becoming a Backend Developer. One language deep, databases, SQL, REST and GraphQL, auth, caching, queues, and production deployments.
A practical, opinionated roadmap to becoming an AI Engineer in 2026. Covers LLMs, RAG, evals, embeddings, Python, FastAPI, and vector databases.
A practical roadmap to becoming a Data Engineer. SQL deep, Python, warehouses, dbt, Airflow orchestration, batch vs streaming, and cloud data services.
A practical roadmap to becoming a DevOps Engineer. Linux, scripting, Docker, CI/CD, Kubernetes, Terraform, AWS, and observability, in the right order.
A practical roadmap to becoming a Frontend Developer. HTML, CSS, JavaScript deep, TypeScript, React and Next.js, accessibility, performance, and testing.
An honest, opinionated roadmap to becoming a Software Development Engineer. CS fundamentals, one language deep, DSA, system design, Git, and real apps.
A practical roadmap to becoming a Site Reliability Engineer. Linux, networking, observability, IaC, Kubernetes, incident response, and SLOs explained in order.
A practical roadmap to becoming a Software Test Engineer or QA Engineer. Manual testing, Playwright and pytest automation, CI, performance testing, and career growth.
A practical 6-step framework for system design interviews that keeps you on track when you are nervous, short on time, and asked to design something huge.
Leaving a job is easy. Leaving well is rare. Here is how to switch engineering jobs without torching your reputation or your future references.
ArgoCD makes Git the source of truth for your Kubernetes clusters. Learn the GitOps pattern, the App-of-Apps model, and sync strategies that work.
Use the matrix strategy in GitHub Actions to test across Node versions, operating systems, and dependency sets without duplicating workflow files.
Set up NGINX as a reverse proxy for Node, Python, or container backends with the right headers, timeouts, and TLS configuration for production.
Learn the foundations of Terraform: writing HCL, configuring providers, managing state, and creating your first cloud resource the right way.
A practical guide to Docker networking: the default bridge, user-defined bridges, host networking, container DNS, and how port publishing actually works.
A practical guide to backtracking: the recursion template, pruning, classic problems with code, and complexity analysis for subsets and permutations.
Understand Bellman-Ford's relaxation loop, how it handles negative edges, detects negative cycles, and why it costs more than Dijkstra.
Learn Dijkstra's shortest path algorithm with a clean Python implementation, complexity analysis, and the priority queue intuition behind it.
Learn the divide-and-conquer pattern through merge sort and quick sort, recurrence relations, the Master theorem, and how to recognize the pattern.
Implement and understand the Fenwick tree, also called the binary indexed tree, for O(log n) prefix sums and point updates in just a few lines.
Learn how heaps power priority queues, why heapq runs push and pop in O(log n), and how to solve classic Top-K and merge problems in Python.
Build minimum spanning trees with Kruskal's union-find approach and Prim's priority queue approach, with side-by-side Python implementations.
A careful walkthrough of 3Sum using sort plus two pointers. We handle duplicate triplets cleanly and avoid the classic off-by-one traps.
Walk through Best Time to Buy and Sell Stock. We go from the quadratic brute force to a clean one-pass solution tracking the running minimum.
The queue-with-size BFS pattern, why DFS still works, and how this template extends to zigzag and right-side view.
Walk through Climbing Stairs from brute force recursion to bottom-up DP, with edge cases, complexity analysis, and an interview script.
Why a hash map from original to copy is the entire idea, plus the BFS variant for stack-limited environments.
Walk through Coin Change with brute force recursion, memoization, and bottom-up DP. Includes complexity analysis and interview script.
Solve Container With Most Water with the two-pointer technique. We prove correctness and contrast it with the quadratic brute force.
Solve Combination Sum with a clean backtracking template. Pruning, duplicate avoidance, complexity discussion, and interview script.
Detect cycles and produce a valid course order using DFS-based topological sort. Includes BFS Kahn alternative and interview script.
Edit Distance fully unpacked — the three-operation recurrence, the 2D table, and the rolling-array space optimization that makes interviewers nod.
Solve Daily Temperatures with a monotonic decreasing stack of indices. Includes brute force comparison, walkthrough, complexity, and interview tips.
Solve the Group Anagrams problem cleanly with a hash map keyed by sorted strings or character counts. Includes complexity analysis and interview talking points.
Solve Generate Parentheses with counting-based backtracking. Clean invariant, walkthrough, complexity discussion, and interview tips.