---
title: "Discussion on \"LeetCode Daily Challenge-2210 Count Hills and Valleys in an Array(Easy, Two Pointers, O(n))\" | Hashnode"
description: "Discussion on \"LeetCode Daily Challenge-2210 Count Hills and Valleys in an Array(Easy, Two Pointers, O(n))\". Problem Description\nLeetCode 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..."
url: "https://hashnode.com/posts/leetcode-daily-challenge-2210-count-hills-and-valleys-in-an-arrayeasy-two-pointers-on/6885a49901d50b502c002ea3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [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...

Jul 27, 2025 · 4 min read · huanganni.hashnode.dev  
Read the article

-   [#leetcode-solution](https://hashnode.com/tag/leetcode-solution)
-   [#leetcodedaily](https://hashnode.com/tag/leetcodedaily)
-   [#two-pointers](https://hashnode.com/tag/two-pointers)
-   [#leetcode-easy](https://hashnode.com/tag/leetcode-easy)

## Written by

[Anni Huang](https://hashnode.com/@HuangAnni)

@HuangAnni · Singapore

  
[View profile](https://hashnode.com/@HuangAnni)

LLM Training Operation Specialist @ ByteDance | Ex-Master of IT in Business (AI track) at SMU

I’m Anni Huang, an AI researcher-in-training currently at ByteDance, specializing in LLM training operations with a coding focus. I bridge the gap between engineering execution and model performance, ensuring the quality, reliability, and timely delivery of large-scale training projects.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
