Game of Strings
Practice
4.2 (5 votes)
Algorithms
Dynamic programming
Easy
Open
Two dimensional
Problem
62% Success 8095 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code
Harsh and Akshara are playing the Game of Strings. This game is a simple one and is played as a team. Both the players of a team will be given a string respectively. At the end of this game, every team is required find out the length of the longest string S such that the strings given to each of the team members is a subsequence of S and S contains no vowels. Help Harsh and Akshara in finding out the required length.
Input:
Input consists of a single line containing two space separated strings.
Output:
The length of the longest string that satisfy the given conditions.
Constraints:
1 ≤ length of string ≤ 5000
Submissions
Please login to view your submissions
Similar Problems
Points:30
80 votes
Tags:
CombinatoricsData StructuresDynamic ProgrammingEasyTwo dimensional
Points:30
5 votes
Tags:
CombinatoricsDynamic ProgrammingEasy
Points:30
18 votes
Tags:
Dynamic ProgrammingEasyReadyRecruitTwo dimensionalapproved
Editorial