Notes to Hiring Manager

This is my submission for the role of Intern at Kargo. My solution is written in JavaScript and can be found here:

https://github.com/crispinamuriel/kg_crispinamuriel_2019

Setup

To use this repo:

  • Clone this repo
  • Run the following commands:
cd kg_crispinamuriel_2019
node main.js 123 321 

Test

I have written a small test suite using the Testem and Jasmine frameworks.

  • To run Testem/Jasmine tests use the following commands:
cd kg_crispinamuriel_2019
npm install
testem

open your browser to http://localhost:7357/

Question:

Determine whether a one-to-one character mapping exists from one string, s1, to another string, s2.

For example, given s1 = abc and s2 = bcd, print "true" into stdout since we can map each character in "abc" to a character in "bcd".

Given s1 = foo and s2 = bar, print "false" since the character ‘o’ cannot map to two characters.

But given s1 = bar and s2 = foo, print "true" since each character in "bar" can be mapped to a character in "foo".

Criteria:

  1. Preferred Languages: JavaScript, Golang, Python (Java is also acceptable)

  2. Upload your solution to GitHub, using the naming convention:

“kg_<github_username>_<year_of_graduation>” as the name of your repository. a. i.e: github.com/user123/kg_user123_2021

  1. Have at least 2 commits into your branch.
  • a. Please make sure that you have a "main" file (main.go/main.js/main.py) in the root directory of your project, and that when you run the file with the test input as arguments, it should print the result in the standard output (please be sure to remove your debugging print statements before you submit, otherwise it could affect how your submission is graded)

-b. We will run your code in the following manner:

(master) js_code_submission node main.js 123 321 (master) go_code_submission go run main.go 123 321 (master) py_code_submission python3 main.py 123 321

  1. Commit messages should be descriptive to reflect the changes as accurately as possible.

  2. The final version of your solution must be on the master branch

This assessment is valid for 7 days, and will expire by the end of day (EOD) at 6pm from when you received the email.

Once you have completed the above assessment, please submit your GitHub URL via the link provided in the email.

Regardless of the result of this assessment, you will be contacted by Kargo, and we ask that you be patient as we do our best to assess all applications in a timely manner.

Finally, we want to wish you all the best in this assessment, and we look forward to seeing you on-site and working with you this Summer.

Cheers,

Kargo Engineering