Tag: array
6 posts
-
Data Structures for Beginners: Arrays, Lists, Stacks, Queues, Trees and Graphs Compared
An introduction to data structures: arrays, linked lists, stacks, queues, trees and graphs, their time complexities, and how to pick one for a real problem.
-
JavaScript Arrays and Objects: map/filter/reduce, Destructuring, Spread and Common Mistakes
JavaScript arrays and objects: map, filter, reduce, sorting, Object.keys/entries, destructuring, spread/rest—patterns for everyday JS code.
-
C++ std::span | Contiguous Memory View (C++20)
std::span for arrays and vectors: non-owning view, subspan, bounds, const correctness, lifetime pitfalls, and C API interop.
-
C++ Array vs vector: Performance, Safety, and When to Use
C arrays, std::array, and std::vector compared: where the memory lives, pointer decay, bounds checks, copy semantics, and where the real performance cost is.
-
Arrays vs Linked Lists for Coding Interviews: Access Costs, Two Pointers and Common Traps
Arrays and linked lists for coding interviews: how their time complexities differ, the two-pointer and prefix-sum techniques that show up most, and practice problems by difficulty.
-
C++ Aggregate Initialization: What Counts as an Aggregate, C++17/20 Rule Changes, and Designated Initializers
Which structs and arrays are aggregates, why a defaulted constructor stops counting in C++20, base classes, designated initializers, parenthesized init, and narrowing errors.