The Question
CodingString Transformation via Character Mapping
Given two strings str1 and str2 of equal length consisting of lowercase English letters, determine if str1 can be transformed into str2. A transformation consists of replacing all occurrences of a specific character with another lowercase letter. You may perform any number of such transformations sequentially. Note that a transformation must apply to all instances of the chosen character simultaneously.
Java
Greedy
Hash Map
Graph Theory
March 4, 2026