Basic mapping
Input
s = 'egg', t = 'add'
Output
True
e -> a, g -> d, consistent mapping exists and is one-to-one.
Full lesson preview
Determine whether two strings are isomorphic by ensuring a one-to-one mapping between characters.
Problem statement
Task
Examples
Input
s = 'egg', t = 'add'
Output
True
e -> a, g -> d, consistent mapping exists and is one-to-one.
Input format
Output format
Constraints
Samples
Input
s = 'paper', t = 'title'
Output
True
p->t, a->i, p mapped consistently, e->l, r->e. Mapping is bijective.