Announcements

Course Info

Welcome to CS35X. This half-credit course will introduce fundamental ideas in algorithm engineering through the lens of competitive programming problems. We will study standard Abstract Data Types (ADTs) and their applications. We will study algorithms for solving problems including graph algorithms and math algorithms, and we will implement solutions using STL data strucutres in the C++ programming language.

This course is available only to current CS35 students. We expect this course to complement the CS35 curriculum.

Meeting Times:

Section Days Time Room Instructor

1

T

1:15-2:30

SCI 240

Joshua Brody

Support Staff & Office Hours

Name Office Hours Location

Joshua Brody

Thu 2:00 PM - 4:00 PM (and by appt)

SCI 260

Textbook

There is no required textbook for this course. Each week we will release lecture notes based on that week’s lecture.

Here are a few other useful online resources:

Course Goals

By the end of the course, we hope that you will have developed the following skills:

  • You will know how to solve basic competitive programming problems.

  • You will learn and understand how to use several standard data structures, including lists, stacks, queues, dictionaries, and priority queues.

  • You will have a deep understanding of how to process input and output in C++.

  • You will understand how to distinguish easy from hard problems quickly.

  • You will be able to apply standard algorithmic design techniques to solve computational problems of moderate difficulty. You will be able to write programs solving these problems from scratch.

Schedule

WEEK DAY ANNOUNCEMENTS TOPIC & READING NOTES & LABS
1

Sep 24

 

Course Introduction, Input/Output

Week 1

Problem Set 1

2

Oct 01

 

arrays, String Processing

  • C++ strings
  • C++ arrays
  • identifying easy problems

Week 2

Problem Set 2

3

Oct 08

 

Lists

  • The List ADT
  • C++ vector class

Week 3
Problem Set 3

 

Oct 15

Fall Break

4

Oct 22

 

Dictionaries

  • Dictionary ADT
  • unordered_map class
  • map class

Week 4
Problem Set 4

5

Oct 29

 

Graph Algorithms

  • stacks
  • queues
  • BFS

Week 5
Problem Set 5

6

Nov 05

Quiz 1 in class

Debugging

  • recap Graph Algorithms
  • debugging strategies

Week 6

7

Nov 12

 

Math Problems

  • handling large numbers
  • generating primes
  • factoring

Week 7
Problem Set 7

8

Nov 19

 

Priority Queues

  • Priority Queue ADT
  • priority_queue class
  • Dijkstra's Algorithm

Week 8
Problem Set 8
Contest 2

9

Nov 26

Quiz 2 in class

Prefix Sums


Week 9

10

Dec 03

 

Binary Search the Answer


11

Dec 10

Quiz 3 in class

slack week


Grading Policies

Grades will be weighted as follows:

60%

Lab assignments

20%

Programming Contests

15%

Quizzes

5%

Class Participation

Quizzes

Quizzes will be administered in class on the days indicated on the schedule. Please look over these dates carefully and contact the professor well in advance if you cannot be in class for a quiz.

If you are not present on the day of a quiz, and you do not let us know ahead of time that you are missing class, you will receive a zero for that quiz.

There will be no final exam for the semester.

Lab Policy

This course features weekly programming assignments which are the largest component of your course grade. Assignments will typically be released after lecture and be due the night before lecture the following week. You are strongly encouraged to start early.

You will submit your assignments on Kattis.

Late Policy

Late submissions will not be accepted. Even if you do not fully complete a lab assignment you should submit what you have done to receive partial credit.

The CS labs are open 24 hours a day, 7 days a week for you to use for CS35X lab assignments.

Academic Integrity

Academic honesty is required in all your work. Under no circumstances may you hand in work done with or by someone else under your own name. Discussing ideas and approaches to problems with others on a general level is encouraged, but you should never share your solutions with anyone else nor allow others to share solutions with you. You may not examine solutions belonging to someone else, nor may you let anyone else look at or make a copy of your solutions. This includes, but is not limited to, obtaining solutions from students who previously took the course or solutions that can be found online. You may not share information about your solution in such a manner that a student could reconstruct your solution in a meaningful way (such as by dictation, providing a detailed outline, or discussing specific aspects of the solution). You may not share your solutions even after the due date of the assignment.

In your solutions, you are permitted to include material which was distributed in class, material which is found in the course textbook, and material developed by or with an assigned partner. In these cases, you should always include detailed comments indicating on which parts of the assignment you received help and what your sources were.

When working on quizzes, exams, or similar assessments, you are not permitted to communicate with anyone about the exam during the entire examination period (even if you have already submitted your work). You are not permitted to use any resources to complete the exam other than those explicitly permitted by course policy. (For instance, you may not look at the course website during the exam unless explicitly permitted by the instructor when the exam is distributed.)

Failure to abide by these rules constitutes academic dishonesty and will lead to a hearing of the College Judiciary Committee. According to the Faculty Handbook:

Because plagiarism is considered to be so serious a transgression, it is the opinion of the faculty that for the first offense, failure in the course and, as appropriate, suspension for a semester or deprivation of the degree in that year is suitable; for a second offense, the penalty should normally be expulsion.

This policy applies to all course work, including but not limited to code, written solutions (e.g. proofs, analyses, reports, etc.), exams, and so on. This is not meant to be an enumeration of all possible violations; students are responsible for seeking clarification if there is any doubt about the level of permissible communication.

The general ethos of this policy is that actions which shortcut the learning process are forbidden while actions which promote learning are encouraged. Studying lecture materials together, for example, provides an additional avenue for learning and is encouraged. Using a classmate’s solution, however, is prohibited because it avoids the learning process entirely. If you have any questions about what is or is not permissible, please contact your instructor.

Student Support

EdSTEM

In addition to the office hours this semester we’re using an EdSTEM course discussion forum. You can post questions to EdSTEM at any time, and you may do so anonymously to classmates and/or privately (to instructors only). If you have questions that you feel the whole class would benefit from (e.g., lab clarifications), please post them here so that everyone can learn from the discussion.

Please keep in mind the following guidelines:

  1. EdSTEM should be used for ALL content and logistics questions outside of class and office hours. Please do not email instructor(s) with your code or questions about the assignments. We can see questions on EdSTEM, so you’ll likely get a faster response than direct email.

  2. If there is a personal issue that relates only to you, please email your instructor.

  3. We encourage non-anonymous posts (which will count towards participation), but you may post anonymously. Abuse will not be tolerated.

  4. Do NOT post long blocks of code on EdSTEM - if you can distill the problem to 1-2 lines of code and an error message, that’s fine, but try to avoid giving out key components of your work.

  5. By the same token, when answering a question, try to give some guiding help but do not post code fixes or explicit solutions to the problem.

Academic Accommodations

If you believe you need accommodations for a disability or a chronic medical condition, please contact Student Disability Services (via email at studentdisabilityservices@swarthmore.edu) to arrange an appointment to discuss your needs. As appropriate, the office will issue students with documented disabilities or medical conditions a formal Accommodations Letter. Since accommodations require early planning and are not retroactive, please contact Student Disability Services as soon as possible.

For details about the accommodations process, visit the Student Disability Services website.

To receive an accommodation for a course activity, you must have an official accommodation letter from the Office of Student Disability Services and you need to meet with course staff to work out the details of your accommodation at least two weeks prior to the activity.

You are also welcome to contact any of the course staff privately to discuss your academic needs. However, all disability-related accommodations must be arranged, in advance, through Student Disability Services.

How to Succeed in CS35X

  • Attend class.

    The primary introduction to course material is through class lecture. Additionally, we often do lab exercises during class. This is an important part of the learning process, as these exercises give you immediate experience with the material we are covering.

  • Ask questions if you don’t understand

    There are lots of opportunities for you to ask questions: attending class, office hours, and EdSTEM. This class continually builds on previous material, so if you don’t understand something one week, it will continue to be a problem the next week, and the week after that, and so on.

  • Practice, practice, practice

    The only way to effectively learn the material is to consistently do the in-class exercises and lab assignments. Finish all of these programs — and do some extras, for fun! Even if you don’t get them done on time, they will still help you learn the material.