All students concentrating in computer science must take three prerequisite computer science courses: COS 126, COS 217 and COS 226. AB candidates must also take Math 103-104 and one of Math 202 or 204. (The math requirement is automatically fulfilled by BSE candidates through their general BSE degree requirements.) All prerequisite courses must be taken for a letter grade, not PDF. The three prerequisite computer science courses introduce the core concepts and techniques of the field. All three are offered every semester.
Students with significant background may elect to place out of any number of the intro courses. To do so, speak with Christopher Moretti (cmoretti@)
COS 126 - General Computer Science
COS 126: General Computer Science, is a broad technical introduction to the field. It is required for all engineering students as well as prospective computer science concentrators. Normally, one completes this course by the end of their first year.
COS 126 Description from the course website:
"An introduction to computer science in the context of scientific, engineering, and commercial applications. The goal of the course is to teach basic principles and practical issues, while at the same time preparing students to use computers effectively for applications in computer science, physics, biology, chemistry, engineering, and other disciplines. Topics include: programming in Java; hardware and software systems; algorithms and data structures; fundamental principles of computation; and scientific computing, including simulation, optimization, and data analysis."
Last semester’s course website: https://www.cs.princeton.edu/courses/archive/spr19/cos126/syllabus.html
COS 217 - Introduction to Programming Systems & COS 226 - Algorithms and Data Structures
These are complementary courses, COS 217 deals with the organization of the computing machine itself and the design of core programs needed to use the machine. COS 226 deals with the design and evaluation of efficient algorithms for tasks that are essential to a preponderance of systems programs and applications. It also addresses the efficient organizations of data essential to these algorithms. Normally, both COS 217 and COS 226 are completed by the end of sophomore year.
COS 217 Description from the course website:
"The purpose of this course is to provide the fundamental background necessary to understand, design and implement the components of programming systems. Examples of such components include text editors, assemblers, compilers, loaders, interpreters, and portions of operating systems. The course is divided into three major parts: machine organization and assembly language programming, program design and development, and software tools."
Last semester’s course website: https://www.cs.princeton.edu/courses/archive/spring19/cos217/
COS 226 Description from the course website:
"This course surveys the most important algorithms and data structures in use on computers today. Particular emphasis is given to algorithms for sorting, searching, and string processing. Fundamental algorithms in a number of other areas are covered as well, including geometric and graph algorithms. The course will concentrate on developing implementations, understanding their performance characteristics, and estimating their potential effectiveness in applications."
Last semester’s course website: https://www.cs.princeton.edu/courses/archive/spring19/cos226/
What to take when
A common question amongst undergraduates is when to take these three courses. The main goal for any prospective major should be to have these three courses completed by the end of sophomore year. It is possible for students to pass out of 126, but many students who technically pass out still take the course in the beginning of their first year. This is for good reason: COS 126 offers a good "refresh" of material learned in high school and also covers topics not covered in typical high school courses..
Once a student takes (or passed out of) 126, the next decision is whether to take 217 or 226 first, or to take them simultaneously. There is no straight answer to this question. Students who take them simultaneously may find the course load very heavy, so this is generally not advised unless you are an older student is catching up, or a glutton for punishment. The curricula of the courses are largely different and neither relies on the material of the other, so both orders are equally valid.
Additional information can be found on the Paths Through the Major.