---
title: "#leetcodehard articles | Hashnode"
description: "Explore 9 articles tagged #leetcodehard on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/leetcodehard"
---

Tag

# #leetcodehard

9 posts · 0 followers

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 20, 2025](https://hashnode.com/posts/leetcode-daily-challenge-leetcode-1948-delete-duplicate-folders-in-system-two-solutionshard-java/687cefe8f3f849c27f8d1a3d)

### [LeetCode Daily Challenge-LeetCode 1948 Delete Duplicate Folders in System-Two Solutions(Hard, Java)](https://huanganni.hashnode.dev/leetcode-daily-challenge-leetcode-1948-delete-duplicate-folders-in-system-two-solutionshard-java?utm_source=hashnode&utm_medium=feed)

Problem Understanding LeetCode 1948-Delete Duplicate Folders in System The goal is to delete all duplicate folder subtrees. Two folders are considered duplicates if they have the same structure and folder names in their subtrees. Solution 1: Standa...

6 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-daily-challenge-leetcode-1948-delete-duplicate-folders-in-system-two-solutionshard-java?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 18, 2025](https://hashnode.com/posts/leetcode-daily-challenge-2163-minimum-difference-in-sums-after-removal-of-elementshard-java-dppriorityqueuegreedy/6879c39e8768b04af3a6ad99)

### [LeetCode Daily Challenge-2163: Minimum Difference in Sums After Removal of Elements(Hard, Java, DP+priorityQueue+greedy)](https://huanganni.hashnode.dev/leetcode-daily-challenge-2163-minimum-difference-in-sums-after-removal-of-elementshard-java-dppriorityqueuegreedy?utm_source=hashnode&utm_medium=feed)

TC O(n log n) SC O(n) using minHeap, maxHeap and DP

6 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-daily-challenge-2163-minimum-difference-in-sums-after-removal-of-elementshard-java-dppriorityqueuegreedy?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 14, 2025](https://hashnode.com/posts/leetcode-460-lfu-cache-hard-java/68746abb865486d8e09f6ea6)

### [LeetCode 460 LFU Cache (Hard, Java)](https://huanganni.hashnode.dev/leetcode-460-lfu-cache-hard-java?utm_source=hashnode&utm_medium=feed)

Two-Level Eviction with O(1) Operations

5 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-460-lfu-cache-hard-java?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 7, 2025](https://hashnode.com/posts/4-median-of-two-sorted-arrays-from-intuitive-to-optimizedjava-hard/686b249c02c6a66b10059386)

### [4\. Median of Two Sorted Arrays: From intuitive to optimized(Java, Hard)](https://huanganni.hashnode.dev/4-median-of-two-sorted-arrays-from-intuitive-to-optimizedjava-hard?utm_source=hashnode&utm_medium=feed)

From O(m+n) to O(log(n)) using binary search

6 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/4-median-of-two-sorted-arrays-from-intuitive-to-optimizedjava-hard?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 5, 2025](https://hashnode.com/posts/mastering-the-trapping-rain-water-problem-two-on-java-solutions/6868c9a4e67498836dc94684)

### [Trapping Rain Water: From Intuitive to Optimized Solutions - Top Tech & Investment Banking Interview Guide (Java, Hard, O(n))](https://huanganni.hashnode.dev/mastering-the-trapping-rain-water-problem-two-on-java-solutions?utm_source=hashnode&utm_medium=feed)

For every position, the water it can trap equals min(maxLeft, maxRight) - height\[i\] (when positive).

4 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/mastering-the-trapping-rain-water-problem-two-on-java-solutions?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 4, 2025](https://hashnode.com/posts/leetcode-daily-challenge-3333-find-the-original-typed-string-ii-advanced-dynamic-programming-solutionhard/6867420b62ff19750ca3a6a7)

### [LeetCode Daily Challenge-3333: Find the Original Typed String II - Advanced Dynamic Programming Solution(Hard)](https://huanganni.hashnode.dev/leetcode-daily-challenge-3333-find-the-original-typed-string-ii-advanced-dynamic-programming-solutionhard?utm_source=hashnode&utm_medium=feed)

Combinatorics + Dynamic Programming: The "Total Minus Invalid" Approach

5 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-daily-challenge-3333-find-the-original-typed-string-ii-advanced-dynamic-programming-solutionhard?utm_source=hashnode&utm_medium=feed)

[shohanur rahman](https://hashnode.com/@katakuri) · [Nov 2, 2024](https://hashnode.com/posts/leetcode-233-number-of-digit-one-was-fun/67267760f9e6fc945095e93f)

### [Leetcode 233 (Number of Digit One) was fun.](https://shohan777.hashnode.dev/leetcode-233-number-of-digit-one-was-fun?utm_source=hashnode&utm_medium=feed)

This one is a math problem. And I enjoyed every bit of cracking the equation. The problem was, “Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.” At first I thought of doing recursi...

2 min read · [shohan777.hashnode.dev](https://shohan777.hashnode.dev/leetcode-233-number-of-digit-one-was-fun?utm_source=hashnode&utm_medium=feed)

[Saurav Maheshwari](https://hashnode.com/@xauravww) · [Sep 3, 2024](https://hashnode.com/posts/merging-k-sorted-linked-lists/66d6ad062f517f0b3539e72f)

### [Merging K - Sorted Linked Lists](https://xauravww.hashnode.dev/merging-k-sorted-linked-lists?utm_source=hashnode&utm_medium=feed)

Simple Guide to Combining Multiple Sorted Linked Lists

4 min read · [xauravww.hashnode.dev](https://xauravww.hashnode.dev/merging-k-sorted-linked-lists?utm_source=hashnode&utm_medium=feed)

[Jay Chouksey](https://hashnode.com/@jaychouksey) · [Jul 20, 2024](https://hashnode.com/posts/first-missing-positive/669b98bdaa93986f63a5c118)

### [First Missing Positive](https://jayjava.hashnode.dev/first-missing-positive?utm_source=hashnode&utm_medium=feed)

Introduction Today, I took on a challenging problem from LeetCode: First Missing Positive. This hard-level question tests your algorithmic skills, requiring an O(n) time complexity solution with O(1) auxiliary space. The goal is to find the smallest ...

4 min read · [jayjava.hashnode.dev](https://jayjava.hashnode.dev/first-missing-positive?utm_source=hashnode&utm_medium=feed)
