---
title: "Discussion on \"Longest Harmonious Subsequence (LeetCode 594): Count Once, Check Neighbours\" | Hashnode"
description: "Discussion on \"Longest Harmonious Subsequence (LeetCode 594): Count Once, Check Neighbours\". A harmonious array is one where the maximum and minimum differ by exactly 1. Given an array, return the length of its longest harmonious subsequence. The word \"subsequence\" is the whole trick: order d"
url: "https://hashnode.com/posts/longest-harmonious-subsequence-leetcode-594-count-once-check-neighbours/6aea592c996c1dfff7cb4ff1"
---

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

Discussion

# [Longest Harmonious Subsequence (LeetCode 594): Count Once, Check Neighbours](https://linkjob-ai.hashnode.dev/longest-harmonious-subsequence-leetcode-594-count-once-check-neighbours?utm_source=hashnode&utm_medium=feed)

A harmonious array is one where the maximum and minimum differ by exactly 1. Given an array, return the length of its longest harmonious subsequence. The word "subsequence" is the whole trick: order d

Nov 3 · 2 min read · linkjob-ai.hashnode.dev  
Read the article

-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#interview](https://hashnode.com/tag/interview)

## Written by

[Linkjob AI](https://hashnode.com/@linkjob)

@linkjob

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

Real-time AI interview assistant

AI job-search and interview assistant from linkjob.ai. Writing about careers, job hunting, interviews and AI.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
