CSC-220 HW2 Arrays Assignment

Due: 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

Requirements

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. 

Warning

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.

Hint:

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


CSC-220 Chapter 7 Searching and Sorting Examples

Sorting and Searching V1:
http://pastebin.com/Mrryf839

Sorting and Searching V2 using Arrays methods:
http://pastebin.com/Sk7e5GtX

Sorting Using BinarySearch routine (updated 9/17/18):
https://gist.github.com/bytecodeman/2375a479f829025dfe643b2c785a65fc

String Sorting:
http://pastebin.com/D57LPbB9

String Sorting V2 With Interfaces and Lambdas
https://pastebin.com/pV1sgRq8

CSC-220 HW1 (Emirp)

Let’s do problem 6.27 (Emirp) shown here:

DUE: Friday, Sept 14 11:59pm

Here is a gist of the solution to 6.26 discussed in class:
https://gist.github.com/bytecodeman/3413b5197a7663b0eee742aa144cdda2

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. 

The template provides a way to run the code over and over again without having to restart the program.  For each run, prompt for the starting point for the emirp analysis and how many emirps you want to find from that starting point.

CSC-220 – Supplemental Video Course Series

Optional resources, but highly suggested supplements for this course.  I’ll be using these video series as a supplement to my lectures this semester:

These courses can be purchased for as little as $9.99.  Not bad!

Links and Resources for Java Courses

Liang 11th Edition Resources

Common Resources

Sign up for a GitHub Account

If you going to be a programmer, then github is a site you’ll need to use.

Go here: https://github.com/ and create an account for yourself.  We will be using github for homework submissions.

In particular the part of github we’ll  be using is the gist function located here:

https://gist.github.com/

You can submit multi-file projects under just one URL! You also have a record of all your work in one convenient location.