Tag: list
5 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.
-
vector vs list vs deque: Why Cache Locality Usually Beats Big-O
Choosing between C++ STL vector, list and deque: internal layouts, time complexity, real benchmarks showing cache effects, and a situation-by-situation selection guide.
-
Python list vs tuple vs set: Mutability, Duplicates, Big-O and Memory
Compare Python list, tuple, and set: ordering, duplicates, big-O operations, memory, and a decision flowchart for real code.
-
Python Data Types Explained: Mutability, Aliasing, Float Rounding, is vs == and Truthiness
How Python data types really behave: names vs objects, list aliasing and copies, int vs float precision, round() and Decimal, str immutability, dicts, is vs ==.
-
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.