Tag: C++
-
The Big O Lie: Why You Should (Almost) Always Default to Vector
If you’ve ever taken a data structures class, you know the drill: arrays are for random access, and linked lists are for heavy insertions and deletions. The theory tells us that inserting into the middle of a linked list is a beautiful, constant-time $O(1)$ operation, while an array forces an ugly $O(N)$ memory shift. But…
Written by
-
The New std::print in C++23: A Modern Replacement for cout and printf
For decades, C++ developers have relied on two main ways to print output: But in C++23, we finally get something modern: Yes — C++ now has a built-in, type-safe, Python-style printing function. Let’s explore what std::print is, why it matters, and how it compares to older methods. What Is std::print? std::print is introduced in C++23…
Written by
