---
title: "Discussion on \"Longest Common Subsequence (LCS)\" | Hashnode"
description: "Discussion on \"Longest Common Subsequence (LCS)\". Problem\nGiven two strings text1 and text2, return the length of their longest common subsequence*.* If there is no common subsequence, return 0.\nA subsequence of a string is a new string generated from the original string with some characters (can be..."
url: "https://hashnode.com/posts/longest-common-subsequence-lcs/6922c79f24a96ecfd57e388d"
---

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

Discussion

# [Longest Common Subsequence (LCS)](https://chetan77.hashnode.dev/longest-common-subsequence-lcs?utm_source=hashnode&utm_medium=feed)

Problem Given two strings text1 and text2, return the length of their longest common subsequence\*.\* If there is no common subsequence, return 0. A subsequence of a string is a new string generated from the original string with some characters (can be...

Nov 23, 2025 · 5 min read · chetan77.hashnode.dev  
Read the article

-   [#longest-common-subsequence](https://hashnode.com/tag/longest-common-subsequence)
-   [#lcs](https://hashnode.com/tag/lcs)
-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#dsa](https://hashnode.com/tag/dsa)
-   [#dynamic-programming](https://hashnode.com/tag/dynamic-programming)

## Written by

[Chetan Datta](https://hashnode.com/@chetan77)

@chetan77 · Hyderabad, India

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

Software Engineer

I share my learnings here. Thanks for reading.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
