
What Is Endianness? The Byte Order Rule Every Engineer Needs
What is endianness? It determines byte order in multi-byte integers. Learn big-endian vs little-endian, network byte order, and when it bites in interviews.
Page 5 of 61 · Ideas for curious minds in tech.
Back to the archive
What is endianness? It determines byte order in multi-byte integers. Learn big-endian vs little-endian, network byte order, and when it bites in interviews.

Learn to compute the modular inverse using Fermat's Little Theorem and Extended Euclidean. Includes linear precomputation and Python and Java examples.

Fermat's Little Theorem gives you the modular inverse in one step: a^(p-2) mod p. Covers the formula, nCr mod prime, and when to use it in coding interviews.

Euler's totient function φ(n) counts integers coprime to n. Learn the O(√n) formula, the sieve, and the modular inverse it unlocks on composite moduli.

Coprime numbers share no common factor greater than 1. Learn the GCD=1 definition, three key properties, and four LeetCode problems that hinge on this check.

The prime factorization algorithm explained: trial division in O(√n), Python code, exponent maps for divisor counting, LCM, ugly numbers, and LeetCode 651.

The modulo operation returns the remainder after division. Learn the 5 interview patterns it powers, the negative-number trap, and 3 bugs to avoid.

Floor and ceiling functions explained for coding interviews: binary search midpoints, heap parent formulas, ceiling without floats, and language quirks.

Two series patterns drive almost every Big-O bound. Learn how arithmetic and geometric series determine algorithm time complexity from first principles.

Fibonacci dynamic programming: why naive recursion collapses, how memoization fixes it, and the O(1) space pattern that wins the coding interview.

Catalan numbers show up in coding interviews more than you think. Learn the recurrence, the DP solution, and how to spot them in BST and bracket problems.

Learn what the binomial coefficient C(n,k) is, how to compute it without overflow, and why it matters for backtracking complexity in coding interviews.

Permutation vs combination in one question: does order matter? Formulas, backtracking templates, and complexity for coding interviews.

Total order vs partial order: what each means, why sort needs a total order, and how a partial-order comparator silently corrupts your code.

Lexicographic order explains why ["10","9"] sorts wrong, powers tries, and hides inside next permutation and anagram grouping. Complete interview guide.

The difference between Comparable and Comparator in Java, the integer overflow trap, the consistent-with-equals rule, and what interviewers actually test.

The activity selection problem picks the most non-overlapping intervals from a set. Sort by finish time. Here's the proof it always works.

The interval scheduling algorithm solves the activity selection problem with one greedy insight: sort by finish time. Proof, variants, and interview patterns.
Learn what an axis-aligned bounding box is, how to compute it in O(n), check overlaps in O(1), and recognize it in LeetCode grid and geometry interviews.

The closest pair of points algorithm finds two nearest points in O(n log n). This guide explains divide and conquer and the 8-point strip bound.

Computational geometry algorithms explained: orientation test, Graham Scan convex hull, closest pair, sweepline, and point-in-polygon for interviews.

The sweep line algorithm converts interval overlap problems from O(n²) to O(n log n): sort events, walk them left to right, maintain state.

What is a convex hull? Learn the rubber band definition, the cross product primitive, and why LeetCode 587 Erect the Fence is a hull problem.

What is linear programming? The optimization technique behind max-flow, bipartite matching, and LP duality. Simplex, interior point, and integer LP explained.