Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a function to determine if two strings are isomorphic (if characters in one string can be replaced to get the other string).

Hard

Problem Statement

Write a function to determine if two strings are isomorphic (if characters in one string can be replaced to get the other string).

Sample Input

egg, "add"

Sample Output

True

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
def is_isomorphic(): s1 = "egg" s2 = "add" # Your code here return
Log in or sign up to run or submit your code.Log inSign up
Input
egg, "add"
Expected Output
True