Skip to content

unreasonably effective

you can be sloppy, as long as you are rigorous

  • LeetCode 1152: Analyze User Website Visit Pattern

    link Time: , space: .

    tanvirdotzaman

    May 19, 2025
    amazon, fine_tune_interview
  • LeetCode 994: Rotting Oranges

    link We let rotting wavefronts emanate from all rotten oranges in each iteration of BFS. As soon as fresh orange count drops to zero we are done. Time: , space: .

    tanvirdotzaman

    May 15, 2025
    amazon, fine_tune_interview, graph
  • LeetCode 42: Trapping Rain Water

    link A bar can hold some water atop if there are left and right supports for it. So, we can compute water on top of each bar and sum up. Time: , space: . We could pre-compute left and right support for each index. Time: , space: . With two pointers moving from two ends,…

    tanvirdotzaman

    May 15, 2025
    amazon, fine_tune_interview
  • Distributed Cache

    Memcache A global, in-memory hash-table distributed across servers. Key and value are strings, item has TTL on top of LRU eviction. Memcache@scale

    tanvirdotzaman

    May 6, 2025
    distributed_system, Uncategorized
  • Physics: Reading

    General Project Course Evolution University Character Lectures By symmetry Noether’s theorem Covariant Mathematician’s pov Geometry Gravitation The book Spacetime Illustrations

    tanvirdotzaman

    May 4, 2025
    Uncategorized
  • Math: Reading

    Calculus Basic concepts Infinite powers Precalculus made difficult Full frontal calculus Calculus Hitchhiker’s Visual complex Visual diff Real saver Probability Fat chance 10 great ideas Intro Lifesaver Art Infinite joy Foundation Linear algebra Dark art Done right Strang Category Conceptual Illustrated And toposes Strings

    tanvirdotzaman

    May 4, 2025
    Uncategorized
  • LeetCode 1029: Two City Scheduling

    link Brute force Try flying each person to city A and city B and take the minimum cost. Time: , space: . Greedy For a cost pair , when we decide to fly a person to city A, we are also deciding to not fly that person to city B. We have to optimize both…

    tanvirdotzaman

    May 2, 2025
    foundational_interview, greedy
  • LeetCode 22: Generate Parentheses

    link Valid parentheses have two criteria: We can include “(” if one is available. We cannot close more than opens. So, we include “)” only if enough opens have already been included. Recursive Time: , space: .

    tanvirdotzaman

    May 1, 2025
    foundational_interview, subsets
  • LeetCode 17: Letter Combinations of a Phone Number

    link Recursive Letter combinations of “23” is the cartesian product of corresponding letter sets: {“a”, “b”, “c”} and {“d”, “e”, “f”}. Note, there can be at most four different letters for a digit. Time: , space: . Iterative For each possible letter for a new digit, we can append it to each of the earlier…

    tanvirdotzaman

    May 1, 2025
    foundational_interview, subsets
  • LeetCode 46: Permutations

    link Recursive Time: , space: . Iterative For a new element , for each earlier permutations, we can insert in different positions to get more permutations. Time: , space: .

    tanvirdotzaman

    May 1, 2025
    foundational_interview, subsets
1 2 3 … 30
Next Page

Blog at WordPress.com.

  • Subscribe Subscribed
    unreasonably effective

    Have a WordPress.com account? Log in now.

  • unreasonably effective
    View site in Reader
    Manage subscriptionsSign upLog in
    Report this content
    Collapse this bar