Tap here to switch tabs
Problem
Submissions

Problem: String Transforms Into Another String

med
30 min
Try to solve the String Transforms Into Another String problem.

Statement

Given two strings str1 and str2 of equal length, determine whether it is possible to transform str1 into str2 using zero or more conversion operations.

In a single operation, you can choose any character and simultaneously convert every occurrence of that character in str1 to another lowercase English letter.

Return true if str1 can be transformed into str2, or false otherwise.

Constraints:

  • 1≤1 \leq str1.length == str2.length ≤104\leq 10^4

  • str1 and str2 contain only lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: String Transforms Into Another String

med
30 min
Try to solve the String Transforms Into Another String problem.

Statement

Given two strings str1 and str2 of equal length, determine whether it is possible to transform str1 into str2 using zero or more conversion operations.

In a single operation, you can choose any character and simultaneously convert every occurrence of that character in str1 to another lowercase English letter.

Return true if str1 can be transformed into str2, or false otherwise.

Constraints:

  • 1≤1 \leq str1.length == str2.length ≤104\leq 10^4

  • str1 and str2 contain only lowercase English letters.