Last Updated: September 1, 2020
This page contains instructions on how to prepare for the MPCS Programming Placement Exam. If you are registered for this exam, please make sure you read this page carefully.
It is your responsibility to complete the items on this checklist before the exam. If you do not, it will very likely impact your performance in the exam. Please read this list carefully.
❏ You have read and understand the instructions in this page.
If anything is unclear, do not wait until the day of the exam! Contact us as email@example.com.
❏ You have read the exams from previous years.
Links to past exams are provided on this page.
❏ You understand and are aware that the exam will be carried out on HackerRank.
You will be able to work on the exam problems from your own computer. You are not required nor expected to use a specific OS environment, nor are we mandating the use of any specific tools. You may use any tools (editors, IDEs, compilers, etc.) available on your personal computer and copy over your solution into the exam window or code directly into the online editor provided by HackerRank.
❏ You have familiarized yourself with the input/output requirements of the exam problems, using your programming language of choice.
❏ You have familiarized yourself with the online HackerRank platform which is used to administer the exam. HackerRank provides a Sample Test you can complete to familiarize yourself with their platform. Please note that you will need to create a HackerRank account to access the test. We encourage you to create one with your @uchicago.edu address.
❏ You have filled out the placement’s exam registration form. We will use the information you provided in that form to send you a private link to take the exam.
❏ You have verified that your language of choice is supported on HackerRank (see this page for list of supported languages). You understand that you must do the exam in the supported language you are most proficient in. In the past, some students have incorrectly assumed that they had to do the exam in the language they expect to use the most in the MPCS. That is not the case: please do not learn a new language just for this exam. Use the language you are most comfortable with.
❏ You have solved the exam from last year successfully on the HackerRank platform, using your programming language of choice. Please note that this exam will be available Tuesday September 9th, 2020. You will be sent a link that will allow you to take the exam.
It is important that you complete all these items! You should not wait until the day of the exam to familiarize yourself with HackerRank.
In the programming placement exam, you will have 90 minutes to write programs that solve a series of programming problems of varying difficulty. You will use the HackerRank platform to submit your solutions to the exam problems. You will just need a web browser and an Internet connection to access this platform. You are expected to write code that compiles and runs correctly.
The exam will have five problems. To pass the exam, we expect students to solve three problems (with, at most, only minor issues or errors). Partial credit may be awarded for partial solutions. Students who want to place into Advanced Programming must solve at least four problems. Students who want to waive the Core Programming requirement need to solve all five problems.
Please note that, to pass the exam, students must submit solutions to at least two problems during the exam, where the solution compiles, runs, and passes at least one sample test case. Students who do not meet this requirement will automatically fail the exam, regardless of any credit awarded for partial solutions.
The exam will be open-book and open-Internet. You will be allowed to consult any online documentation, but must cite any resources you use (please do so by adding comments in your code whenever you’ve relied on an external source)
During the exam, you will submit your solutions through HackerRank, a web-based platform that will run your solution with a series of test cases, and will tell you whether your solution passed the test cases or not. Although the results of the test cases will be a factor in evaluating your solution, your code will also be stored in a database for further evaluation by a human grader.
HackerRank has a public website that you can access at any time before the exam. This website provides the exact same interface you will encounter during the exam. We recommend taking a look at their sample practice exam to get familiar with the testing environment.
Before the start of the exam, you will receive an email from us with a link to the exam. Once you click on the link, fill out all required information and agree to the terms in the “Confirmation Form” section then you will begin the 90 minute exam by clicking on the “Agree & Start” button. The following sections describe the problem structure and information you should know while taking the exam.
As you will see on the HackerRank site, all the exam problems require you to write a program that will read some input, which you must then process in a way specified in the problem statement, and produce an output in a specific format. You must write your solution in a single file (Java programmers, note that you can include additional top-level classes in a single source file as long as they are unqualified: just "class", without "public")
The format of the input and output is described in each exercise, and you must follow them rigorously. Each problem includes some sample input/output data that you can use to test your solution. Take into account that we will also test your solution with larger test cases.
All input is read from standard input (i.e., it is read “from the console”). You can assume that all input is correct and meets the specifications given in the problem statement; do not waste time validating the input. All output should be printed to standard output. Anything printed to standard error will be ignored (i.e., you can use standard error to print debugging statements).
As you work through past exam problems, you'll notice that the input/output requirements are very similar across problems. In particular, it is useful to think of the input as a stream of tokens (with each value, or token, separated by a space or a newline). All modern programming languages include libraries to easily read in this kind of data, without having to read in the file byte by byte or doing any complicated parsing. In particular, you may want to look at:
C++: The iostream library, including the << and >> operators.
Note: You are not limited to using just the above mechanisms. They are just suggestions; if you have another preferred method of reading tokenized input in your programming language of choice, you are welcome to use it (as long as it doesn't require using external libraries not included with the language's standard library).
During the exam
The exam will include five problems. The difficulty of the problems will be similar to the sample exams from previous years. In this exam, we need to see evidence that you know how to write code that compiles and runs correctly: Three partial solutions (as long as they compile and run) are actually much better to us than a single solution (even if it is 100% correct). The more code we see from you, the better.
We suggest you follow this strategy during the exam:
Select a problem that you feel you can solve easily, and write a solution in your text editor/IDE.
Manually test the solution with the sample input provided. Since all programs must read from standard input, when your program runs it will be waiting for input to be entered on the console. You can just copy-paste the sample input and press Control-D to signal the end of input. Check whether it produced the exact same output shown in the problem statement. If it does not, your solution is incorrect.
If your output matches the output shown in the problem statement, submit to HackerRank by copying over your code into the code window for the problem. Clicking the “Run” button and then clicking the “Test Results” tab will show you whether you passed all test cases for a problem.
If you get an “All available test cases passed” message, you're done with this problem. Move on to the next one.
If you get anything other than “All available test cases passed”, it's likely that your solution is substantially correct, but is failing on a corner case.
Don't obsess over this! If your solution (1) compiles, (2) runs, and (3) solves the problem correctly for the sample test cases, then your solution is very likely 95% correct. Move on to the next problem, and revisit any non-Accepted problems if you have time at the
Please note that you can write and test your code directly into the code window for any problem. If you feel more comfortable working in a text editor/IDE on your personal computer then we recommend that you work within that environment and then copy over your solution. However, there is no file uploading on HackerRank so you must copy over your solution once you feel it's ready to be fully tested on HackerRank.
Make sure to click the “Submit Test” button on the main exam page once you have completed the test.
All our past placement exams are available on Kattis, which uses a problem format that is similar to HackerRank’s. You can view these exames on this section of the Kattis website:
On that page, click on an academic year, and then on the “Problem list” link. This will show you a list of all the problems from that year's exam. To submit a solution to a problem, you will need to create an account on the general Kattis site:
You should also read the documentation provided by Kattis, specially their tutorials on submitting solutions:
We will have a zero tolerance policy for academic dishonesty in this exam, and you will be required to view a short academic honesty training video before taking the exam. In a nutshell, you cannot collaborate or communicate with any other person on this exam, nor use anyone else's code in your solution. Any instances of academic dishonesty will result in a FAIL on the exam. For MPCS students, you will be required to begin the MPCS program with MPCS 50101 Concepts of Programming and you will be placed on academic probation until you complete three core classes in the MPCS. For students in other programs, you will be ineligible to take MPCS classes for the entire duration of your program, and the incident will be reported to your program, with a recommendation for you to be placed on academic probation, or to impose a comparable penalty.