LeetCode Daily Challenge-1233. Remove Sub-Folders from the Filesystem(Med, Java)
Two solutions: Sorting+Prefix Check vs Trie (Prefix Tree) TC: both O(n log n + n·m) SC: O(1) vs O(n·m)
Jul 19, 20253 min read1

Search for a command to run...
Articles tagged with #sorting
Two solutions: Sorting+Prefix Check vs Trie (Prefix Tree) TC: both O(n log n + n·m) SC: O(1) vs O(n·m)

An example of boxing and unboxing

Mastering Two-Pointer Technique with Combinatorics: From O(2^n) to O(n log n)

Mastering the Art of Greedy Selection While Preserving Order

Greedy Algorithms Can Miss Global Optimums: Why Always Targeting the Maximum Isn't Always Optimal
