Daily Challenge
December 31, 2025
Longest Common Subsequence
Find the length of the longest common subsequence between two strings.
Problem Statement
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 none) deleted without changing the relative order of the remaining characters.
For example, "ace" is a subsequence of "abcde".
A common subsequence of two strings is a subsequence that is common to both strings.
Examples
Input:
text1 = "abcde", text2 = "ace"
Output:
3
Explanation:
The longest common subsequence is "ace" and its length is 3.
Previous Daily Challenges
Build a URL Shortener
Create a URL shortening service like bit.ly with analytics and custom domains.
Reverse String
Write a function that reverses a string.
Personal Finance Tracker
Build a comprehensive personal finance tracking application.
E-commerce Inventory Management System
Build a complete inventory management system for an e-commerce platform.
Social Media Analytics Dashboard
Build a comprehensive social media analytics dashboard with data visualization.