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

Tag

# #leetcode-easy

13 posts · 0 followers

[Anni Huang](https://hashnode.com/@HuangAnni) · [Aug 5, 2025](https://hashnode.com/posts/leetcode-daily-challenge-3477-fruits-into-baskets-iieasy-on/68917ae6f2dbd648272e4d13)

### [LeetCode Daily Challenge-3477. Fruits Into Baskets II(Easy, O(n²))](https://huanganni.hashnode.dev/leetcode-daily-challenge-3477-fruits-into-baskets-iieasy-on?utm_source=hashnode&utm_medium=feed)

Unavoidable O(n²) - Optimal Solution in Python, Java, Golang, C, C#, C++

4 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-daily-challenge-3477-fruits-into-baskets-iieasy-on?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 27, 2025](https://hashnode.com/posts/leetcode-daily-challenge-2210-count-hills-and-valleys-in-an-arrayeasy-two-pointers-on/6885a49901d50b502c002ea3)

### [LeetCode Daily Challenge-2210 Count Hills and Valleys in an Array(Easy, Two Pointers, O(n))](https://huanganni.hashnode.dev/leetcode-daily-challenge-2210-count-hills-and-valleys-in-an-arrayeasy-two-pointers-on?utm_source=hashnode&utm_medium=feed)

Problem Description LeetCode 2210 asks us to count the number of hills and valleys in an array. A hill is an element that is strictly greater than its neighbors, while a valley is an element that is strictly smaller than its neighbors. The key challe...

4 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-daily-challenge-2210-count-hills-and-valleys-in-an-arrayeasy-two-pointers-on?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 13, 2025](https://hashnode.com/posts/leetcode-160-intersection-of-two-linked-lists-four-complete-solutions-easy-java-on/68732859d81d41a1697bd63a)

### [LeetCode 160 Intersection of Two Linked Lists - Four Complete Solutions (Easy, Java, O(n))](https://huanganni.hashnode.dev/leetcode-160-intersection-of-two-linked-lists-four-complete-solutions-easy-java-on?utm_source=hashnode&utm_medium=feed)

From Brute Force to Mathematical Elegance: A Comprehensive Approach Analysis

5 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-160-intersection-of-two-linked-lists-four-complete-solutions-easy-java-on?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 12, 2025](https://hashnode.com/posts/leetcode-1909-remove-one-element-to-make-the-array-strictly-increasing-optimal-solution-by-analyzing-possible-cases-and-find-patterns-java-on/68721e1719d373dc0759d88c)

### [LeetCode 1909. Remove One Element to Make the Array Strictly Increasing - Optimal solution by analyzing possible cases and find patterns (Java, O(n))](https://huanganni.hashnode.dev/leetcode-1909-remove-one-element-to-make-the-array-strictly-increasing-optimal-solution-by-analyzing-possible-cases-and-find-patterns-java-on?utm_source=hashnode&utm_medium=feed)

The algorithm works by counting violations first, then checking if the violations can be fixed by removing exactly one element.

4 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-1909-remove-one-element-to-make-the-array-strictly-increasing-optimal-solution-by-analyzing-possible-cases-and-find-patterns-java-on?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 12, 2025](https://hashnode.com/posts/leetcode-2006-count-number-of-pairs-with-absolute-difference-k-from-brute-force-on-to-optimal-on-using-frequency-array-easy-java-on/6872287690e18a0deab95671)

### [LeetCode 2006 Count Number of Pairs With Absolute Difference K - From brute force O(n²) to optimal O(n) using frequency array (Easy, Java, O(n))](https://huanganni.hashnode.dev/leetcode-2006-count-number-of-pairs-with-absolute-difference-k-from-brute-force-on-to-optimal-on-using-frequency-array-easy-java-on?utm_source=hashnode&utm_medium=feed)

This is an optimized frequency-based solution for counting pairs with absolute difference \`k\`.

4 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-2006-count-number-of-pairs-with-absolute-difference-k-from-brute-force-on-to-optimal-on-using-frequency-array-easy-java-on?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 10, 2025](https://hashnode.com/posts/leetcode-232-implement-queue-using-stacks-by-using-two-stacks-easy-java/686f53dee7495083f41f75bf)

### [LeetCode 232 Implement Queue using Stacks - by using two stacks (Easy, Java)](https://huanganni.hashnode.dev/leetcode-232-implement-queue-using-stacks-by-using-two-stacks-easy-java?utm_source=hashnode&utm_medium=feed)

O(n) time complexity for peek/pop, other operations O(1)

3 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-232-implement-queue-using-stacks-by-using-two-stacks-easy-java?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 10, 2025](https://hashnode.com/posts/leetcode-326-power-of-three-step-by-step-breakdowneasy-java-on/686f6538c831041a9cb1587d)

### [LeetCode 326 Power of Three - Step by Step Breakdown(Easy, Java, O(n))](https://huanganni.hashnode.dev/leetcode-326-power-of-three-step-by-step-breakdowneasy-java-on?utm_source=hashnode&utm_medium=feed)

LeetCode 326. Power of Three This code determines whether a given integer n is a power of three. A power of three is any integer that can be expressed as (3^k) where (k) is a non-negative integer (e.g., (3^0 = 1), (3^1 = 3), (3^2 = 9), etc.). Step-b...

4 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-326-power-of-three-step-by-step-breakdowneasy-java-on?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 9, 2025](https://hashnode.com/posts/leetcode-706-design-hashmap-how-hashmap-is-implemented-in-java-easy-on/686e653c13acbdba8bfec2fe)

### [Leetcode 706 Design HashMap - How HashMap is Implemented in Java (Easy, O(n))](https://huanganni.hashnode.dev/leetcode-706-design-hashmap-how-hashmap-is-implemented-in-java-easy-on?utm_source=hashnode&utm_medium=feed)

Leetcode 706: Design HashMap Problem Summary – Leetcode 706: Design HashMap You're asked to implement a basic HashMap data structure that supports: put(key, value) — insert/update a key-value pair. get(key) — retrieve the value by key; return -1 if ...

4 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-706-design-hashmap-how-hashmap-is-implemented-in-java-easy-on?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 6, 2025](https://hashnode.com/posts/121-best-time-to-buy-and-sell-stockjava-easy-on/686a914f578347a8421c1f88)

### [121\. Best Time to Buy and Sell Stock(Java, Easy, O(n))](https://huanganni.hashnode.dev/121-best-time-to-buy-and-sell-stockjava-easy-on?utm_source=hashnode&utm_medium=feed)

Track the minPrice and update maxProfit if (price-minPrice)>maxProfit

5 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/121-best-time-to-buy-and-sell-stockjava-easy-on?utm_source=hashnode&utm_medium=feed)

[Anni Huang](https://hashnode.com/@HuangAnni) · [Jul 4, 2025](https://hashnode.com/posts/leetcode-daily-challenge-3330-find-the-original-typed-string-i/68673dd2aca0116053b00e9d)

### [LeetCode Daily Challenge-3330. Find the Original Typed String I(Easy)](https://huanganni.hashnode.dev/leetcode-daily-challenge-3330-find-the-original-typed-string-i?utm_source=hashnode&utm_medium=feed)

A Simple Pattern Recognition Problem with an Elegant Solution

5 min read · [huanganni.hashnode.dev](https://huanganni.hashnode.dev/leetcode-daily-challenge-3330-find-the-original-typed-string-i?utm_source=hashnode&utm_medium=feed)
