CSC-220 HW2 Arrays Assignment

Due: Friday, Sept. 21, 2018  11:59pm

Given two strings s and t, determine if they are isomorphic.

Two strings are isomorphic if the characters in s can be replaced to get t.

All occurrences of a character must be replaced with another character while preserving the order of characters. No two characters may map to the same character but a character may map to itself.

Example 1:
Input: s = “egg”, t = “add”
Output: true

Example 2:
Input: s = “foo”, t = “bar”
Output: false

Example 3:
Input: s = “paper”, t = “title”
Output: true


Incorporate the Project Template for those writing a command line program.  CSC-112 graduates can write a GUI to do this problem for extra credit.  Don’t forget that knowledge. 


Only use the material up to and including Chapter 7 on single dimension arrays.  If you include data structures that are beyond what we covered, then you will be asked to demo your code to class and explain its operation.


To convert a string to an array, use the String .toCharArray() method.