Strings Equal Under a Letter Bijection
Asked at Amazon · Coding Questions · Difficulty: Medium
For each pair, repeated operations swap all occurrences of two chosen letters (a relabeling that can realize any letter permutation). Return, per pair, whether `product_a[i]` can be transformed into `product_b[i]`.
Loading the problem…