✅LC 16 – 3Sum Closest (medium)
Remember, if you have a nested loop with a decreasing inner loop, total pointer movement is still proportional to n^2:
n + (n−1) + (n−2) + ⋯ + 1 = n(n+1)/2 = O(n^2)
Pattern: Arrays & Pointers
Time: O(n^2)
Space: O(1)
✅LC 151 – Reverse Words in a String (medium)
Prepping for a C# OA lately and the transition from Java wasn't bad at all. Methods are capitalized, StringBuilder is your friend, strings are indexable just like Java.
Pattern: Strings & Pointers
Time: O(n)
Space: O(n)
#LeetCode
I've been practicing #LeetCode and wanted to dig deeper on hashmaps — how random are hash functions really, and how does that lead to O(1) lookups? I ran a simulation and compared the results to the Poisson distribution. Check out my first blog post: jfischer.dev/blog/how-random…