This course aims to prepare students in competitive problem solving.
It will benefit NUS students who want to compete in ICPC, invited high school students (via CeNCE CS3) who want to compete in IOI (not just for NOI), and NUS students in general who aspire to excel in technical interviews of top IT companies, especially NUS current (2025++) ICPC donors: Jane Street, HRT, Jump Trading, Optiver, Citadel | Citadel Securities, and Huawei.
It covers techniques for attacking and solving challenging* computational problems. Fundamental algorithmic solving techniques covered include complete search, divide/reduce/transform and conquer, greedy, dynamic programming, etc. Domain specific techniques like graph, mathematics-related, string processing, and computational geometry will also be covered. Some additional topics may be included depending on how the semester progresses. Programming language libraries that are commonly used in problem solving will also be taught.
*We only study well-known/solved problems, not research problems.
Note: This introductory message will not be prominent the next time you visit this URL again. This behavior is normal. You can view it again by scrolling to the top of this page.
The quota of this class (S2 AY 2022/23 onwards) is 39, as that is the largest class size that is still considered a 'small course' where Bell Curve system does not have to be used. In 16+ academic years of CS3233 classes, on average only ~20 NUS students were enrolled per year. Although it was 30+ in the last three AYs (possibly including this S2 AY24/25).
Useful information to help you decide on whether you should offline register for CS3233:
Do you have national (but preferably international) programming competition background before? Examples: SGP NOI (or IDN OSN, VNM VNOI, CHN NOIP, MYS MCO, PHL NOI, IND ICO, etc), IOI (especially the recent IOI 2024 or IOI 2023), ICPC (especially the recent ICPC Asia Jakarta, Hanoi, and/or Yokohama 2024), Facebook Hacker Cup, CodeForces rated rounds, etc?
The difficulty of this course is very extreme for those without such background... but typically those that satisfy the next requirement (see question 2) can survive just as well... We will study problems that require (advanced) data structure and/or algorithms that are typically asked in programming competitions, and we have to implement those solutions fast and without bug...
Did you score well (at least A-) in CS1010/variant and CS2040/variant (and preferably score A+ in all; CS3230 (and CS4234) are good to have but optional)?
This course has a very high performance bar and the average GPA of the students enrolled in the recent AYs are/were 4.67 (this S2 AY24/25), did not track/ask between 2023 back to 2020, 4.57 (2019), 4.78 (2018, early year of grade-free first year policy), 4.3+, 4.33, 4.44, 4.43, 4.45, and 4.30 (out of 5.00), respectively. You will need special permission from the instructor (A/Prof Steven Halim) if you do not satisfy the pre-requisites listed above (the filter is there for your own good). PS: Getting at least A- in CS2030/variant is included as official pre-requisite of CS3233, but an exception can be made if all other indicators are good.
Are you OK to be tortured for one semester for a mere 4 units (your other courses may also suffer)?
You may have to take lighter set of other courses or be ready to S/U other courses or to rush course project submissions (for project-based courses that have STePS on Wednesday night of Week 13 — no longer clash with CS3233 Monday night classes) or to rush final assessment preparations for other courses only during study week (no final assessment for CS3233). Please do NOT take CS3233 course with another course that is known to be challenging/demanding (e.g., the 5 units CS3217 in Sem2, among others) unless you are very confident of yourself and have historical academic performance to back that up. Moreover, your ego may be hurt if some of the young NOI trainees (Sec2-JC2 students) beat you in (many) CS3233 contests (a few guest students may now return to F2F mode onsite at PL2-TBC). Try to ask CS3233 seniors who have taken (and survived) this course before applying, or read their public stories, e.g., Lim Jay Ching (exchange from University of Waterloo).
Are you thinking on applying to top (or emerging) IT companies like NUS current (2024/25; list to be refreshed by January 2025) ICPC donors: Jane Street, HRT, Jump Trading, Optiver, Citadel | Citadel Securities, Huawei, or other large IT companies like Google, Meta (Facebook), Microsoft, Sea Group, etc in the future?
Some of our ex-CS3233 graduates are now in those companies :). See the CS3233 Hall of Fame to see the current known status of CS3233 past top students. Since a few AYs ago, many of these company (HR) reps will (e-)visit some of our (mini) contests and give prizes and/or recruitment talks which may be (much) faster than normal application route... Some seniors have cited that these direct connections with top IT companies is actually one of the nicest features of CS3233...
Can you code in C++ (primary language), Python (second choice), and/or Java (third choice)?
We will use C++ (17), Python (3), and Java (17) in CS3233 (in that order :O). In this course, we are expecting students to be multi-lingual :O. Although a few ex-students had survived CS3233 with only (or mostly) Java and/or the slower Python, they struggled more compared to those who are well versed in C++ (fastest programming language for programming competitions). Since AY 2018/19, Python (3) has been used and has given some advantage at certain problems for students who master this language. However, Python code is usually slow (albeit usually also shorter). An algorithm written in Python may get TLE while the same algorithm written in C++/Java pass the time limit.
Do you want to learn interesting data structures, algorithms, (other programming language especially if C++ is not your primary language) and more importantly: On how to apply them properly — from teaching staffs who are deeply involved in such programming competitions?
Instructor: Associate Professor Steven Halim, current CeNCE Director, Singapore IOI team leader, ICPC Asia Pacific Championship 2025 Contest Director (also Asia Singapore Regionals 2015 and 2018), the author of Competitive Programming text book (the official text book of this course, we will use CP4 Book 1 and Book 2), former Deputy Director for IOI 2020 and IOI 2021 in Singapore (online competitions), former NUS ICPC coach (5x ICPC World Finals Coach Award).
Rating (out of 5.0) | Jan-Apr 2025 (n=34) | Jan-Apr 2024 (n=34) | Jan-Apr 2023 (n=31) | Jan-Apr 2022 (n=28) | Jan-Apr 2021 (n=18) | Jan-Apr 2020 (n=12) |
---|---|---|---|---|---|---|
Course feedback (SoC avg lvl 3000 ~3.9) | ≥ 4.4 (tgt) | 4.4 ▼ | 4.9 (PB) ▲ | 4.7 ▼ | 4.8 ▼ | 4.9 (PB) |
Course difficulty (SoC avg lvl 3000 ~3.8) | ≤ 4.3 (tgt) | 4.3 ▼ | 4.6 (PW) ▲ | 4.3 == | 4.3 ▲ | 4.2 |
Prof Halim's teaching (SoC avg lvl 2000 ~4.2) | ≥ 4.5 (tgt) | 4.6 ▼ | 4.9 (PB) ▲ | 4.8 ▼ | 4.9 (PB) == | 4.9 (PB) |
Qualified Teaching Assistant(s):
Usually, CS3233 TAs have teaching feedback rating of around ~4.5 too (i.e., very good).
TA will be mostly available in NUS ICPC Lab (COM1-02-15), especially every Monday, 4.00-5.15pm to answer any CS3233/Competitive Programming queries, if any.
Known damages are (illustrations are in C++), but not limited to:
Fortunately, it is known that past CP-ers can somehow undo these damages to return back to normal SE practices, e.g., this one (so don't worry my fellow SoC SE colleagues :).
If you have read all (scary) questions above and are still interested, simply complete this application form to join CS3233 S2 AY2024/25 for offline registration before round 3 (the last day of application). The offline registration will be closed as soon as the number of students hits 39 accepted NUS students.
To minimize the annual attrition rate on Week 02 (Drop without penalty) and also :O on Recess Week (Drop with a 'W' grade, it happens!), the pre-acceptance selection will be made reasonably rigorous, i.e., by showing Prof Halim that the applicant has at least CodeForces (max) rating of ≥ 14001299 (naturally talented, PS: this is a more accurate predictor of potential CS3233 grade) by Tuesday, 31 December 2024, 23.59.
Note: This course registration section will not be prominent from Monday, 09 January 2025 onwards (Week -01). This behavior is normal. You can view it again by scrolling to the top of this page.
Date | News |
---|---|
Thu, 16 Jan 25 new | This page will not be updated that often as most communications with CS3233 students will likely be done 99.9% via internal class Discord server. |
Thu, 09 Jan 25 | Prof Halim has decided the best known 39 students to be offline registered during CourseReg round 3 today. For the rest who have tried (your best) and did not make it this time, please try again for Jan-Apr 2026 edition if you don't already graduate by then. |
Senior students (for CS3233R only): Ong Weng Qi.
Senior students (lurking as guest students): Ho Hong Wei, Tan Kwang Thiag.
Another lurkers: errorgorn, pavement.
Week | Self Reading from CP4 before class (Flipped Classroom) |
Homework (Mon, 9.00am) |
Contest + Debrief/Donor Talk (Mon, 5.30-6.45-7.15pm, PL2) |
Class Topics (Mon, 7.30-9.00pm, PL2) |
---|---|---|---|---|
10 24 Mar |
Chapter 6; Focus on Section 6.6 + 9.45; Read the rest of Chapter 6 by yourself |
HW09 due Solve Mini 07 B/C Kattis set #09 due |
Mini 08 Mathematics Money Contest donated by Jump Trading |
(we will take a class photo #1) A Glance at Bioinformatics String Processing; Focus on Suffix Trie, Suffix Tree, and Suffix Array; a bit of String Hashing VisuAlgo: suffixtree, suffixarray Jump Trading class visit Mon, 24 Mar 2025 7.00-7.30pm + QnA during break time Fri, 28 Mar 2025 is chosen as NUS well-being day S2 AY 2024/25 This is to link with Hari Raya Puasa PH next Monday Also, NUS Online Teaching Feedback opens this Fri You can already start declaring your vote about this course |
11 31 Mar |
No class |
Kattis set #10 due (automatic) |
No class |
No class Hari Raya Puasa Public Holiday |
12 07 Apr |
Chapter 7; Focus on Section 7.2, 7.3, 9.5; Also Section 8.7 (problem decomposition) Read the rest of Chapter 7 by yourself |
HW10 due Solve Mini 08 B/C Kattis set #11 due |
Mini 09 String Money Contest donated by NUS ICPC endowment |
(we will do final team contest formation after Mini 09) (we will then do a no-longer-optional CS3233 Final Online Quiz (7.20-7.30pm)) (we will take another class photo #2 if #1 was not that good) Inside Video Games (Computational) Geometry; Focus on Algorithms on Points, Lines, a bit of 3D Geometry, and Polygon, Art Gallery Problem VisuAlgo: polygon, convexhull (we will run a short last lecture to close the course and may extend beyond 9pm) The Last Lecture (8.50-9.15pm) |
13 14 Apr |
The entire CP4 book 1+2 and beyond Do not forget to give your official NUS Online Teaching Feedback after final team contest is over |
Solve Mini 09 B/C Kattis set #12 due |
Week01-12 stuffs 5.15-9.45pm (4.5h) Money Contest funded by NUS ICPC endowment Join NUS ICPC team selection (~Late August 2025?) |
No lecture, we will do Final Team Contest VisuAlgo (for self-review): maxflow, matching, mvc, steinertree, tsp, cyclefinding, suffixtree, suffixarray, polygon, convexhull Final Team Contest (recent 3 AYs only): Final Team Contest (11 Apr 22) Final Team Contest (10 Apr 23) Final Team Contest (15 Apr 24) Our Final Team Contest (14 Apr 25) is on Kattis Starts at 5.15pm SGT, ends at 9.45pm SGT (4.5 hours) No final assessment, go and save your other courses after tonight Good Friday and Easter Sunday this Week |
This table records the previous top students of CS3233 under Prof Halim (rank 1 up to at most rank 3) of that Academic Year and their current known job* as per last contact with Prof Halim (or as indicated by their latest LinkedIn update).
AY (Iteration) | Rank | Flag and Name | Best ICPC Record | Job* |
---|---|---|---|---|
08/09 (1) | 1 | ![]() |
WF 09 (HM) & 10 (HM) | Addepar (US) |
08/09 (1) | 2 | ![]() |
WF 09 (HM) & 10 (HM) | Microsoft (US) |
09/10 (2) | 1 | ![]() |
WF 12 (HM) & 13 (joint-48) | Quantcast (SG) |
10/11 (3) | 1 | ![]() |
WF 12 (HM) | Microsoft (US) |
10/11 (3) | 2 | ![]() |
WF 12 (HM) & 13 (joint-48) | Meta (US) |
11/12 (4) | 1 | ![]() |
N/A | DTL (SG) |
12/13 (5) | 1 | ![]() |
WF 13 (joint-48) & 16 (joint-14) | Anduin (VN) |
13/14 (6) | 1 | ![]() |
WF 14 (joint-19) & 15 (joint-28) | Roblox (US) |
13/14 (6) | 2 | ![]() |
WF 14 (joint-19) & 15 (joint-28) | Meta (SG) |
14/15 (7) | 1 | ![]() |
Asia Singapore 15 (4th) | Hearth (US) |
14/15 (7) | 2 | ![]() |
WF 15 (joint-28) & 18 (joint-56) | DTL (SG) |
15/16 (8) | 1 | ![]() |
Asia Phuket+Singapore 15 (10th) | [a private hedge fund] |
15/16 (8) | 2 | ![]() |
Asia Singapore 15 (20th) | ByteDance (SG) |
16/17 (9) | TA/Exempted | ![]() |
Asia Manila 17+Nakhon Pathom 18 (1st) | Jump Trading (SG) |
16/17 (9) | 1 | ![]() |
Asia Singapore 18 (16th) | Google (SG) |
16/17 (9) | 2 | ![]() |
WF 17 (joint-20) | Glints |
17/18 (10) | TA/Exempted | ![]() |
Asia Manila 17+Nakhon Pathom 18 (1st) | Jump Trading (SG) |
17/18 (10) | 1 | ![]() |
Asia Jakarta 18+20 (3rd) | Sea Group (SG) |
17/18 (10) | 2 | ![]() |
Asia Jakarta 18+20 (3rd) | Jane Street (HK) |
17/18 (10) | 3 | ![]() |
WF 2019 (joint-62) & 20 (honor) | Jane Street (HK) |
18/19 (11) | Exempted | ![]() |
WF 19 (joint-62) & 20 (honor) | HRT (SG) |
18/19 (11) | Exempted | ![]() |
WF 22 (joint-61) | Stripe (SG) |
18/19 (11) | 1 | ![]() |
WF 2018 (joint-14) & 2021 (HM) | [a private hedge fund] |
18/19 (11) | 2 | ![]() |
Asia Jakarta 19 (1st) | [Graduated] |
18/19 (11) | 3 | ![]() |
N/A | Allium |
19/20 (12) | Exempted | ![]() |
Asia Jakarta 20 (3rd) | [Graduated] |
19/20 (12) | 1 | ![]() |
WF 21 (HM) | Pendle Finance (SG) |
20/21 (13) | Exempted | ![]() |
WF 21 (HM) | Jane Street (HK) |
20/21 (13) | Exempted | ![]() |
Asia Jakarta 20 (3rd) | NUS PhD student |
20/21 (13) | 1 | ![]() |
Asia Jakarta 23 (4th) | NUS SoC Research Assistant |
21/22 (14) | Exempted | ![]() |
Asia Ho Chi Minh City 22 (3rd) | 4th year UG |
21/22 (14) | Joint-1 | ![]() |
AP 24 (2nd); WF 24 (Silver) | 4th year UG, joining Jump Trading (SG) soon |
21/22 (14) | Joint-1 | ![]() |
AP 24 (2nd); WF 21 (Bronze) & 24 (Silver) | DRW (SG) |
21/22 (14) | 3 | ![]() |
AP 24 (2nd); WF 24 (Silver) | Tower Research Capital (UK) |
22/23 (15) | Exempted | ![]() |
WF 23 (HM) | 3rd year UG, Jane Street Intern (HK) |
22/23 (15) | Exempted | ![]() |
Asia Hanoi 2024 (2nd) | 3rd year UG, Jump Trading Intern (SG) |
22/23 (15) | 1 | ![]() |
Asia Jakarta 23 (12th) | 3rd year UG, Jump Trading Intern (SG) |
22/23 (15) | 2 | ![]() |
Asia Jakarta 23 (12th) | 4th year UG |
23/24 (16) | 1 | ![]() |
N/A | 2nd year UG |
23/24 (16) | 2 | ![]() |
ICPC Jak23+24 (2nd); AP 25 (2nd) | 2nd year UG |
23/24 (16) | 3 | ![]() |
WF 23 (HM) | 2nd year UG |
24/25 (17) | Exempted | ![]() |
Asia Jakarta 25 (4th) | 1st year UG |
24/25 (17) | Exempted | ![]() |
Asia Jakarta 25 (4th) | 1st year UG |
24/25 (17) | Exempted | ![]() |
N/A | 1st year UG |
24/25 (17) | 1 | ![]() |
??? | ??? year UG |
24/25 (17) | 2 | ![]() |
??? | ??? year UG |
24/25 (17) | 3 | ![]() |
??? | ??? year UG |
There are two big scoring components: SP(eed) (from live contests, up to 50%) and DI(ligence) (from non-speed-related stuffs, up to 50%).
IMPORTANT change for S2 AY 2024/25 onwards: each component is now capped at 50%, i.e., one cannot just be very speedy (gets 57% from SP component but then gets a bit lazy) or just be very diligent (gets 57% from DI component but actually not that good during contests).
The theoretical max is 100%, with just 60% needed to secure at least a B+ grade in this extremely competitive course.
The SP(eed) component is further divided into two sub-components: M(ini)C(ontest) (up to 36%) and T(eam)C(ontest) (up to 22%).
The DI(ligence) component is further divided into four sub-components: H(ome)W(ork) (up to 15%), (Problem)Bs (up to 10%), K(attis)S(ets) (up to 12%), and Ac(hievements) (up to 20%).
9 Weekly Mini Contests, three problems in 75 minutes, using https://cs3233.com.
(9 weeks x (3%+0.5%+0.5%)/week = 36%).
Occasionally (if Prof Halim is not that lazy), we may open problem D (or even E) which is (are) the easier form of problem B/C. We give bonus 0.5% for top 3 in each mini contest. We use strict binary grading (Accepted or not Accepted: Wrong Answer, Time Limit, Memory Limit, Runtime Error, etc) for our contests.
1 Midterm Team Contest (10%+0.5%=10.5%, 10 "original" problems, worth 1.0% each).
1 Final Team Contest (10%+0.5%=10.5%, 10 "original" problems, worth 1.0% each).
Bonus 0.5% for top 3 teams in both team contests.
Team size is three students.
If the class size is not divisible by 3, the last team can have 4 or 5 members.
10 Weekly Homework (10 weeks * 1.5%/week = 15%).
CP4 book 1+2 review + solve certain written exercises, 1.5%.
Scoring scheme: 0% = no submission, 0.5% = poor, 1% = default score, 1.5% superb.
Solve problem B of last week's mini contest at home, on your own pace, by next Mon 05.30pm, if you fail to solve it during the live Mini Contest. Simply submit your code to cs3233.com, TA will check your last submission.
Scoring scheme:
0% = not AC in the actual mini contest and not attempted after one more week.
1% = managed to solve problem B during mini contest itself or within one more week afterwards.
There is no additional marks for solving problem C at home (for non-CS3233R students).
Prof Halim selects seven targeted Kattis problems related to CS3233 topic of that week (Prof Halim had solved six of them before with one problem that he has not solved before). To get 1% per week, student has to solve at least three (of any preferred difficulty level as indicated in Kattis) of the selected problems within the stipulated deadline (Monday night 09:00pm SGT of that week until Monday 05:30pm SGT of the following week). Note that Prof Halim can see all CS3233 class submissions at nus.kattis!
Please check the details of the 12 Kattis Sets at NUS@Kattis for this semester.
One star = 1%, most achievements are manual entry: