{"id":"f1a60713-0139-44ea-be76-9e01b40817de","name":"Lcs Of Three Strings","description":"1. You are given three strings s1, s2 and s3.\r\n2. You have to find the longest common sub-sequence in the given strings.","inputFormat":"3 Strings s1, s2 and s3.","outputFormat":"Check the sample output and question video.","constraints":"1 < length of strings <= 100","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n\r\n\tpublic static void solution(String str1, String str2, String str3) {\r\n\t\t//write your code here\r\n\t\t\r\n\t}\r\n\t\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tString str1 = scn.next();\r\n\t\tString str2 = scn.next();\r\n\t\tString str3 = scn.next();\r\n\t\tsolution(str1,str2,str3);\r\n\t}\r\n\r\n}"},"node":{"code":""},"ruby":{"code":""},"python":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"pepforpepcoders\r\npepcoding\r\nopepper","sampleOutput":"3\r\n","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"5539a6e8-c8bf-4f04-805c-e43e9d20e72a","name":"Dynamic Programming For Intermediate","slug":"dynamic-programming-for-intermediate-408","type":0},{"id":"57451d68-056f-498a-8227-74b76d278e1b","name":"Lcs Of Three Strings","slug":"lcs-of-three-strings","type":1}],"next":{"id":"4df60ea7-e0a9-4a03-b1f2-0513c199485c","name":"LCS OF THREE STRINGS MCQ","type":0,"slug":"lcs-of-three-strings-mcq"},"prev":{"id":"e7fb7c48-2ccc-465c-a127-779ad7453ba8","name":"SCRAMBLE STRING","type":3,"slug":"scramble-string"}}}

Lcs Of Three Strings

1. You are given three strings s1, s2 and s3. 2. You have to find the longest common sub-sequence in the given strings.

{"id":"f1a60713-0139-44ea-be76-9e01b40817de","name":"Lcs Of Three Strings","description":"1. You are given three strings s1, s2 and s3.\r\n2. You have to find the longest common sub-sequence in the given strings.","inputFormat":"3 Strings s1, s2 and s3.","outputFormat":"Check the sample output and question video.","constraints":"1 < length of strings <= 100","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n\r\n\tpublic static void solution(String str1, String str2, String str3) {\r\n\t\t//write your code here\r\n\t\t\r\n\t}\r\n\t\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tString str1 = scn.next();\r\n\t\tString str2 = scn.next();\r\n\t\tString str3 = scn.next();\r\n\t\tsolution(str1,str2,str3);\r\n\t}\r\n\r\n}"},"node":{"code":""},"ruby":{"code":""},"python":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"pepforpepcoders\r\npepcoding\r\nopepper","sampleOutput":"3\r\n","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"5539a6e8-c8bf-4f04-805c-e43e9d20e72a","name":"Dynamic Programming For Intermediate","slug":"dynamic-programming-for-intermediate-408","type":0},{"id":"57451d68-056f-498a-8227-74b76d278e1b","name":"Lcs Of Three Strings","slug":"lcs-of-three-strings","type":1}],"next":{"id":"4df60ea7-e0a9-4a03-b1f2-0513c199485c","name":"LCS OF THREE STRINGS MCQ","type":0,"slug":"lcs-of-three-strings-mcq"},"prev":{"id":"e7fb7c48-2ccc-465c-a127-779ad7453ba8","name":"SCRAMBLE STRING","type":3,"slug":"scramble-string"}}}
plane

Editor


Loading...

Lcs Of Three Strings

medium

1. You are given three strings s1, s2 and s3. 2. You have to find the longest common sub-sequence in the given strings.

Constraints

1 < length of strings <= 100

Format

Input

3 Strings s1, s2 and s3.

Output

Check the sample output and question video.

Example

Sample Input

pepforpepcoders pepcoding opepper

Sample Output

3

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode