FPEvalDataset/LeetCodeProblem
0302
1{2 "id": 3207,3 "name": "make_three_strings_equal",4 "difficulty": "Easy",5 "link": "https://leetcode.com/problems/make-three-strings-equal/",6 "date": "2023-11-12 00:00:00",7 "task_description": "You are given three strings: `s1`, `s2`, and `s3`. In one operation you can choose one of these strings and delete its **rightmost** character. Note that you **cannot** completely empty a string. Return the _minimum number of operations_ required to make the strings equal_. _If it is impossible to make them equal, return `-1`. **Example 1:** **Input: **s1 = \"abc\", s2 = \"abb\", s3 = \"ab\" **Output: **2 **Explanation: **Deleting the rightmost character from both `s1` and `s2` will result in three equal strings. **Example 2:** **Input: **s1 = \"dac\", s2 = \"bac\", s3 = \"cac\" **Output: **-1 **Explanation:** Since the first letters of `s1` and `s2` differ, they cannot be made equal. **Constraints:** `1 <= s1.length, s2.length, s3.length <= 100` `s1`, `s2` and `s3` consist only of lowercase English letters.",8 "public_test_cases": [9 {10 "label": "Example 1",11 "input": "s1 = \"abc\", s2 = \"abb\", s3 = \"ab\"",12 "output": "2 "13 },14 {15 "label": "Example 2",16 "input": "s1 = \"dac\", s2 = \"bac\", s3 = \"cac\"",17 "output": "-1 "18 }19 ],20 "private_test_cases": [21 {22 "input": [23 "\"xqkqhgglsustxvwxndsvkoowxkp\"",24 "\"cbwmjwfuwlcrqbkopolwnzrnevyzbburgnvqteafhoqvtlchnnamkhpgmuduicvnuudtyswtbddkstsjgtaghmtlm\"",25 "\"dhtalmmraervdjgtnmgzmcsajgecrggnuoulouqhllrtdylkhzbbycqfjvneauanmyv\""26 ],27 "output": -128 },29 {30 "input": [31 "\"xslmewugvdaaobpgkizaddbwtefynig\"",32 "\"fxnsrpsjrtbswpphrtkulgitmtblkyehrlknotfkpwdqhwualiqchmbzckxzlfzedutuwvglwxzuxodqjxvhv\"",33 "\"hvv\""34 ],35 "output": -136 },37 {38 "input": [39 "\"anklygpkcmezpyvobmzjljirwhsfcxajjhtraogxrlfdsvqd\"",40 "\"fhiujkvaxmufgjzplbfebnxdmywnnovwhvwhmsdcfzcekctcpqsnnhrqigqcuawbdzsxdbqxbuqkdlzpifafjjkrkmgtdrwqfnzj\"",41 "\"mjxuwelhdnscmzfhwetjobbcjnjvbhzocxzlrnaazotckzwsuwrbwmcabfuhompsgdbqzd\""42 ],43 "output": -144 },45 {46 "input": [47 "\"jmszcpqqaqjlwxuzwgxiyxrjsewdspinqbmpd\"",48 "\"gymnmqbaqqhqqyaimrwdjmanfhkelavaucznszzoxeynonaujfcitqixcthhmohcaaflkfszmzyvgeacgkktlm\"",49 "\"bbazqvqpwchbtkwlbxqgyphthtqnviuvgkcggfafltgeuzgpesslphxunbjpwlnvsoxxxizbkpozsqbuhcjjzpzuzvk\""50 ],51 "output": -152 },53 {54 "input": [55 "\"tzwaooirwrsn\"",56 "\"mpcgachqmdsrwuujodvbgcdpxtysqgbnyxhtsew\"",57 "\"czqykpxejfumndejfugzfphgsublykowhdpanouszafciycdwlybbrjatikhaakcpgwwomsubkcshmuqeijrwpi\""58 ],59 "output": -160 },61 {62 "input": [63 "\"zsahdtrwtdhnrmlqrqxjrnybnmkyaqniruyuc\"",64 "\"sqsgqkmvzuomyfpzpuzssgkmoxuyxzpwyivhzjwjqgqnqjycsofonpba\"",65 "\"hxwoznldoquhoeadtvwgaewvcmlaydyckpyakqnnynmghoptxqtozf\""66 ],67 "output": -168 },69 {70 "input": [71 "\"zucgojgsmpsagsjdanltuwoxqoytjuxgvzaiepiolmrjxaepcjnhgdqxowfntbrftmci\"",72 "\"qhgfnxxmsjjgpdumxjppxydfjfpvcizqgztrhf\"",73 "\"xjmubvjbgyblqtuvjb\""74 ],75 "output": -176 },77 {78 "input": [79 "\"yqiutibyecl\"",80 "\"ongjjorhininybqctpvqbkxkbrnltyraygwcuuhfrsxmhrjntvvmaxqwuilqpdvxundpnxfradws\"",81 "\"wowepoqzrzpcxmjddthkodjnxjhzzryzcrwsorvgapdusbtmasgilvxtcezlhtdewfhwuqeckoqphhrfr\""82 ],83 "output": -184 },85 {86 "input": [87 "wnbf",88 "vjmineuvfutwcsojysykicdwhqpwxpocsgdhtduqeipdpkagrwiqupwiipoaaftqtekjqhfxyqicfcrd",89 "kduesuwvtmhalmbmozvwutjhxwvanoxgv"90 ],91 "output": -192 },93 {94 "input": [95 "xvbffebdhdjehgkhvapvmtsabthjjufhtrlhmmeoolxohuwjurdpvogxyzjickyidbnafdllgfpszmrbvarllhwnl",96 "navygnpkhfpfbseqsupvdwvsvgsxiujwifbxuzylyvficyemqkwlzhlgnnceh",97 "qhvsytmspzvplezbeemxvyzmdxqrbrxrwuhetdxdiriwztaknjgslnxkrwgwnsflexfwj"98 ],99 "output": -1100 }101 ],102 "haskell_template": "findMinimumOperations :: String -> String -> String -> Int\nfindMinimumOperations s1 s2 s3 ",103 "ocaml_template": "let findMinimumOperations (s1: string) (s2: string) (s3: string) : int = ",104 "scala_template": "def findMinimumOperations(s1: String,s2: String,s3: String): Int = { \n \n}",105 "java_template": "class Solution {\n public int findMinimumOperations(String s1, String s2, String s3) {\n \n }\n}",106 "python_template": "class Solution(object):\n def findMinimumOperations(self, s1, s2, s3):\n \"\"\"\n :type s1: str\n :type s2: str\n :type s3: str\n :rtype: int\n \"\"\"\n "107}