Professional Documents
Culture Documents
222222
222222
Course Description
The goal of this course is to enhance your existing programming skills by ingraining as deep a
mastery of fundamental algorithm and coding skills as possible in the timeframe of the course.
We will seek specifically to maximize your chances of superior performance in any coding
interview, improving your ability to form structured thoughts with respect to algorithmic
problem solving, improve your ability to plan and describe solutions to problems, and develop
further your ability to translate your thoughts into code intuitively and explain that code to
others.
Prerequisites
Students should already be able to program in Java at an intermediate level. No prior
experience with JavaScript or Python is necessary. Familiarity with programming and object
oriented programming principles is useful, as is the abillity to install, configure, and use
integrated development environments such as Eclipse.
Instructor
Ralf Brown (ralf@cs.cmu.edu, GHC 5711) For office hours, see the course Canvas calendar or
www.cs.cmu.edu/~ralf, or send email for an appointment.
Teaching Assistants
Jin Cao <jincao@andrew.cmu.edu>, Shaotong Li <shaotonl@andrew.cmu.edu>,
Kaiyu Zheng <kaiyuz@andrew.cmu.edu>, Tony Zhu <zixuanz2@andrew.cmu.edu>
Office hours are posted to the course Canvas calendar.
Required Text
“Cracking the Coding Interview: 189 Programming Questions and Solutions” 6th Edition
(green cover) by Gayle Laakmann McDowell
Available through the CMU bookstore, from your favorite bookseller, and at
www.amazon.com/dp/0984782850 .
Other material will be provided as needed during the course (see the Canvas “Modules” page).
Waitlist / Auditing
Due to the very high demand for this course, it is unlikely that you will be enrolled if you are not
already on the waitlist by the third day of the semester (i.e. Wednesday, August 28th).
Because of the over-subscription of this course, we will not permit students to audit.
Page 1
Class Information
Class meets Tuesdays and Thursdays from 12:00pm to 1:20pm in DH 1212.
There is no substitute for hands-on learning with algorithms and coding. For this reason,
the majority of material you will be expected to learn will be covered in depth with the
readings and programming assignments you will complete outside lecture. Please
complete all readings prior to the corresponding lecture – they are critical to doing well
on the in-class exercises.
Expect to average a full 12 hours per week on the work for this course
o mock technical interviews: 2 hours
o homework assignments: 4-6 hours (see the graph on Page 9)
o plus readings and working through textbook questions
You will receive email from HackerRank when homeworks and in-class exercises are
assigned.
Due dates for assignments will be provided at the time the assignment is given. Late
assignments will be penalized 10% for every day they are late; assignments will not be
accepted more than seven days late.
If you feel that the grade given on an assignment should be reconsidered, please submit
the re-grade request in writing by email to the instructor, with a brief description of why
you would like the assignment reviewed.
Page 2
Evaluation
Grading will be based on the following criteria:
Page 3
Curving
As this class is deliberately designed to be challenging, the target for the class average score is
85% (it was ~83% in 2016 and ~87% in 2017). We will rescale the numerical scores to shift the
actual average to 85% (if the unscaled average is below) or 88% (if above) with a standard
deviation of 5%. Scaled grades of B+ and A- are the most common; see the grade distribution
graph below. Canvas will be updated regularly with the current curve starting with Homework
#3.
Pass/Fail
For those selecting the Pass/Fail option as permitted by their academic program, the criterion for
a Pass is a grade of at least 75% after curving (a C, the minimum passing letter grade for a
Masters-level course, would be at least 74% after curving). For the past three years, this
threshold has corresponded to a raw grade in the low to mid 60s.
Page 4
Academic Integrity
Collaboration in learning concepts is encouraged among students – feel free to
share notes (but not code) and hold study groups; however attribution must be
given in the form of citation, quotation, or co-authorship on documents.
If a student obtains access to another student’s work without their knowledge, both
students will still be held accountable. Secure your work! To protect future
students (including your future self), do not post your solutions publicly, even
after the end of the course.
Failure to list all participants of a study group on assignments, to disclose all the
participants on a collaborative work, or to disclose the source of any code not
written by yourself is not acceptable. These and any other Academic Integrity
violations will result in a reduction of your final grade by one full letter grade (e.g.
A- to B-) on the first offense, and in the assignment of a failing grade for the
course on the second offense. Violations will be reported to your department,
which may impose additional penalties.
Violations of academic integrity are very serious and can result in heavy
penalties up to suspension or expulsion from the university. Make sure you
review and understand the information at:
http://www.cmu.edu/policies/student-and-student-life/academic-integrity.html.
Page 5
Take care of yourself.
This course is a lot of work. Do your best to maintain a healthy lifestyle this semester by
eating well, exercising, avoiding drugs and alcohol, getting enough sleep and taking some
time to relax. This will help you achieve your goals and cope with stress.
If you find yourself struggling with the material or workload, please ask for help. There
are many helpful resources available on campus – including your course instructor and
TAs – and an important part of the college experience is learning how to ask for help.
Asking for support sooner rather than later is often helpful.
Don't panic if you mess up on one assignment (we actually expect everyone to be
unable to finish some of the in-class exercises). Your grade in this course is based on a
very large number of scores, so any individual assignment has very little effect on your
final grade.
If you or anyone you know experiences any academic stress, difficult life events, or
feelings like anxiety or depression, we strongly encourage you to seek support.
Counseling and Psychological Services (CaPS) is here to help: call 412-268-2922 and
visit http://www.cmu.edu/counseling/ You will not be alone – one in eight CMU students
make use of CaPS each year.
If you or someone you know is feeling suicidal or in danger of self-harm, call someone
immediately, day or night:
CaPS: 412-268-2922 Re:solve Crisis Network: 888-796-8226
If the situation is life threatening, call the police:
On campus: CMU Police: 412-268-2323, Off campus: 911
Page 6
Course Schedule
Wk Date Topic Readings Textbook Questions
1 8/27 Course Overview McDowell Ch. 1
Java - Strings and Arrays
8/29 Computational Complexity McDowell Ch. VI and 2 1.1-1.9
Java - String Manipulation 2.1-2.8
Regular Expressions
2 9/3 Interview Techniques McDowell Ch. VII, 11 11.1-11.6
Java – Testing You Are Not Done
Defensive Programming Testing Until...
(pages 2, 31-32)
9/5 Java – Sorting McDowell Ch. 10 10.1, 10.2, 10.6, 10.11
Merge Sort, QuickSort
3 9/10 Java – Sorting McDowell Ch. 3 3.1-3.6
Insertion Sort, Radix Sort, ...
9/12 Java – Searching McDowell Ch. 4 4.1-4.12, 10.3-10.5
Binary Search, BFS/DFS
4 9/17 No class - attend the Technical
Opportunities Conference instead
Page 7
Wk Date Topic Readings Textbook Questions
Graphs
10/24 Functional Programming McDowell Ch XI, pages
Python – Sorting 642-644
Functional Programming
in Python
10 10/29 Python – Testing / Optimization Monkey Patching
Python – Searching
10/31 Python – Recursion and Dynamic
Programming
11 11/5 State Machines How I Learned to...Love
Combinatorics the State Machine
11/7 JavaScript - Syntax Intro to JavaScript for
Java Programmers
12 11/12 JavaScript – Strings and Sorting JavaScript for Java
Developers
11/14 JavaScript – Recursion and DP
More Sorting (Counting Sort, ...)
13 11/19 JavaScript – Testing / Optimization
JavaScript – Searching
11/21 Self-Adjusting Trees McDowell Ch. XI, pages
637-642
14 11/26 Logic Programming
Flex / Review
11/28 No Class (Thanksgiving)
15 12/3 Final Exam, Part 1
12/5 Final Exam, Part 2
Page 8
Median Homework Load in hours, Fall 2017 and Fall 2018 classes
12
10
6 F18 Shuffle
F18 Homework
4 F17 Shuffle
F17 Homework
2
0
1 2 3 4 5 6 l
k k k k k k rm k 8 k
9
k1
0
k1
1
k1
2 14 na
W W W W W W te W W W W W 3- F i
id k1
M W
25
20
15 2018 Letter
2018 P/F
10 2017 Letter
2017 P/F
0
F C- C C+ B- B B+ A- A A+
Notes: The failure resulted from an Academic Integrity Violation. Mid-semester grades were a
very good predictor of final grades, with the majority of students receiving exactly the same final
grade as midterm grade and nearly all within one step (e.g. A+ to A or B+ to A-). Past results
are not a guarantee of future performance.
Page 9
About HackerRank
Homeworks, in-class exercises, and exams will be conducted using the system provided by
HackerRank.com.
HackerRank provides the following features:
• an editor with code completion
• automatic scoring of submissions based on the number of test cases passed
• timed tests, with automatic submission of code when the time runs out
• logging of activity timelines and all code submissions (if you had a partially-working
solution but the automatic submission was broken, let us know and we can verify your
partial solution and give you credit for it)
• plagiarism detection (flagging submissions which are suspiciously similar to each other)
Sample Problem
If you would like to attempt a sample homework problem to see whether this course is for you,
one of the problems from the first homework assignment in the Fall 2016 and Fall 2017 editions
is available at
http://hr.gs/11601f18sample
This problem took students a median of about 3.5 hours and was generally considered the
second-hardest of the course. You will have 12 hours to complete the problem once you begin.
Page 10
Frequently Asked Questions
Q: I was just notified that I'm now enrolled, but I can't access the course in Canvas!
A: Canvas updates its roster from SIO several times per day rather than instantly. Please be
patient – you'll have access in a few hours.
Q: What is the policy if part of a homework is submitted on time and part late?
A: The late penalty of 10% per day will only be assessed on the points for the part which is
submitted late; the part which is submitted on time will receive full points earned.
Q: How do I get my assignment for the peer mock technical interviews (shuffle)?
A: The information on who to interview, who will interview you, and which questions to ask will
be posted to Canvas as a comment on the appropriate assignment in your gradebook.
Q: My laptop crashed/I fell ill/my Internet went out and the timer ran out on my
homework assignment in HackerRank. What now?
A: Send an email and we can give you additional time to make up for the lost time.
Q: I submitted XYZ, but the Canvas gradebook still shows a missing grade.
A: Most of the grade entries are handled by an external script which must be run manually. For
example, homework assignments are normally processed shortly after the due date and again
shortly after the last possible late submission date. If the grade still shows as missing more than
a week after submission, send an email.
Page 11