FPEvalRepoPublic/LeetCodeMetaData
0399
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",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 "test_case": [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 "constraints": [21 "1 <= s1.length, s2.length, s3.length <= 100",22 "s1, s2 and s3 consist only of lowercase English letters."23 ],24 "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 ",25 "java_template": "class Solution {\n public int findMinimumOperations(String s1, String s2, String s3) {\n \n }\n}",26 "metadata": {27 "func_name": "findMinimumOperations"28 }29}