Daily Challenge

December 31, 2025

Longest Common Subsequence

Dynamic Programming Hard 50 points

Find the length of the longest common subsequence between two strings.

Success Rate
0%

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.

0 attempts today 3 languages

Previous Daily Challenges

Build a URL Shortener

Dec 30, 2025
Medium

Create a URL shortening service like bit.ly with analytics and custom domains.

100 points View Challenge

Reverse String

Dec 29, 2025
Beginner

Write a function that reverses a string.

Personal Finance Tracker

Dec 27, 2025
Medium

Build a comprehensive personal finance tracking application.

E-commerce Inventory Management System

Dec 26, 2025
Hard

Build a complete inventory management system for an e-commerce platform.

120 points View Challenge

Social Media Analytics Dashboard

Dec 25, 2025
Hard

Build a comprehensive social media analytics dashboard with data visualization.

150 points View Challenge

Fibonacci Sequence

Dec 24, 2025
Easy

Calculate the nth Fibonacci number.