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 Gravitation

    tanvirdotzaman

    May 4, 2025
    Uncategorized
  • Math: Reading

    Calculus Probability Linear algebra Category

    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: 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
    • Already have a WordPress.com account? Log in now.
    • unreasonably effective
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar