Hash Table
DraftHow do hash tables hold key-value pairs? Explore hash functions, collisions, load factor, separate buckets, quadratic probing, and Python and C implementations.
Read articleHow do hash tables hold key-value pairs? Explore hash functions, collisions, load factor, separate buckets, quadratic probing, and Python and C implementations.
Read articleHow do 2D and k-dimensional sparse tables answer rectangular queries? Explore overlapping blocks, 2^d hyperblocks, Python and C code, and memory limits.
Read articleHow does a circular queue reuse a fixed buffer? Learn how head, tail, size, capacity, wrap-around, enqueue, and dequeue work in Python and C.
Read articleHow does a deque work as a double-ended queue? Explore operations at both ends, a doubly linked list, collections.deque, a C template, and common uses.
Read articleHow does a queue enforce FIFO order? Explore enqueue, dequeue, peek, front and back, linked-list implementations in Python and C, and common queue problems.
Read articleHow does a sparse table answer static range minimum queries in O(1)? Learn st[k][i], idempotent operations, Python and C implementations, and common mistakes.
Read articleHow does a doubly linked list use prev and next links? Explore its operations, sentinel nodes, common pointer mistakes, and Python and C implementations.
Read articleHow does a singly linked list connect nodes? Explore next links, head and tail, core operations, common pointer mistakes, and Python and C implementations.
Read articleHow does a stack enforce LIFO order? Explore push, pop, peek, and top, Python and C implementations, and common problems solved with stacks.
Read articleHow does a dynamic array grow—and why is append amortized O(1)? Explore size, capacity, resizing, core operations, and Python and C implementations.
Read articleHow do you prove an algorithm correct and estimate its complexity? Learn invariants, asymptotic notation, loops, sums, recursion, and the Master theorem.
Read articleHow should Python programs handle errors? Learn how try, except, else, finally, raise, and assert work with common exceptions.
Read articleHow does import work in Python—and why do circular imports happen? Explore modules, packages, __name__, __all__, caching, bytecode, and import patterns.
Read articleHow do you read and write files in Python safely? Learn open(), with, file modes, seek(), tell(), and the differences between text and binary files.
Read articleHow do you read input and format output in Python? Learn print(), input(), type conversion, f-strings, str.format(), and multiple values per line.
Read articleWhich Python collection should you use? Compare list, tuple, set, and dict, then explore useful data structures from the collections module.
Read articleHow do Python functions work with arguments, objects, and references? Learn how to define and call functions, return values, use defaults, and manage scope.
Read articleHow does a Python for loop work, and when should you use range()? Learn how break, continue, else clauses, and nested loops change iteration.
Read articleHow do pointers, functions, structures, the preprocessor, and dynamic memory work in C—and which patterns help you write safer code?
Read articleWhat are the essential building blocks of C? Explore variables, data types, operators, conditions, loops, arrays, strings, and console input and output.
Read articleWhat is C, and how does GCC turn source into a program? Follow the build stages and learn which compiler flags control warnings, optimization, and debugging.
Read articleWhat is a mathematical set, and how do set operations work? Learn equality, subsets, unions, intersections, differences, and the basic set theorems.
Read articleHow does a Python while loop work—and how do you stop or skip iterations? Learn break, continue, else clauses, and nested loops.
Read articleHow do conditionals work in Python? Learn if, elif, and else syntax, indentation, nested conditions, the ternary operator, and logical operators.
Read articleWhat does a Python variable actually store? Learn naming rules, data types, object references, multiple assignment, and value swapping.
Read articleHow do Python strings handle quotes and special characters? Learn single and double quotes, escaping, concatenation, and repetition.
Read articleWhich number types does Python support, and how do arithmetic operators behave? Learn int, float, and complex literals plus the basic operations.
Read articleHow do you install Python and verify it works? Follow the download, setup, PATH configuration, and version check needed for a working environment.
Read article