2937. Make Three Strings Equal
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
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start