Code Classes

CodeClasses are a series of lectures organised by Foobar on getting started with competitive programming. It is sort of a course parallel to academics which will run throughout the year. It will start by providing a motivation and an overview of what all this is about, the road to becoming a good sport programmer and what lies in it for you as a programmer.There will be a gradual increase in the level of the classes, and we expect people who attend regularly and do practice problems and contests to be ready to become an active part of the competitive programming community.  

We assume no prior knowledge of programming, but we do not teach the syntax of any language or get into the nitty gritties of getting your programs compiled and working. You’re expected to keep working on that yourself to make the most of these classes. The focus will be on useful and important concepts and problem solving strategies, with nifty tricks thrown in here and there. The CodeClasses will not only focus on discussing concepts but would also involve solving problems and writing code for them.

UPDATE (Monsoon'16): We are reverting back to the volunteer-driven CodeClass format. Now, Foobar Members will poll on topics for CodeClasses and the most popular topic will be discussed.

The tentative syllabus that we aim to follow is:

Monsoon Semester Syllabus
  • Intro To Competitive Programming
    • Motivation
    • Warm up puzzles
    • Arrays and strings
    • Running time analysis via sorting, searching
  • Ad Hoc Problems 
  • Number Theory in CP 
  • Combinatorics in CP
  • Intro To Paradigms: Greedy 
  • Intro To Paradigms: DP/Memoization

Winter Semester Syllabus
  • Data Structures - I: stacks, queues, heaps!
  • Intro to C++ and STL 
  • Intro to Graph Theory: Graphs, BFS, DFS 
  • Shortest Paths and Minimum Spanning Trees
  • Data Structures - II: Segment trees
  • Computational Geometry
P.S. We distribute lots of chocolates at every CodeClass. :D

Below we’ll be adding topic, content or reference links for each class that we’ll hold.

CodeClass[38] //Jr. | Binary Search

posted Apr 10, 2017, 12:08 AM by Rounaq Jhunjhunu Wala

CodeClass[38] was organized by Foobar on 6th April 2017. 
Topic covered : Binary Search
Prerequisites: None

This CodeClass was conducted by Kushagra Arora, Nishant Ujjainwal and Shashwat Chaudhary.

A brilliant tutorial-

CodeClass[37] | Intro to Graph Theory

posted Mar 17, 2017, 12:40 PM by Aditi Mithal

CodeClass[37] was organized by Foobar on 9th February 2017. 
Topic covered : Intro to Graph Theory
Prerequisites: None

This CodeClass was conducted by Parth Mittal.

CodeClass[36] | Intro to C++ and the STL

posted Mar 17, 2017, 12:34 PM by Aditi Mithal

CodeClass[36] was organized by Foobar on 31st January 2017. 

The 37th CodeClass conducted by Foobar focused on the usage of already implemented data structures and algorithms in the Standard Template Library (STL) that helps a lot not only in competitive programming but also in general programming.

STL has plenty of data structures (like vectors, queues, sets, stacks, etc.) and algorithms (like sort, binary_search, etc.) already implemented. Using them, saves time and makes coding convenient not only during contests, but otherwise too.

FooBar has conducted a similar session in the past (CodeClass[27] and CodeClass[18]), the material related to STL can be found here:

This CodeClass was conducted by Parth Mittal.

CodeClass[35] | Number Theory in CP 2

posted Jan 30, 2017, 7:31 AM by Rounaq Jhunjhunu Wala   [ updated Mar 17, 2017, 12:30 PM by Aditi Mithal ]

CodeClass[35] was organized by Foobar on 17th January 2017. 
Topics covered :  Number Theory 2
Prerequisites: Number Theory 1 [From CodeClass[34]]

This CodeClass was conducted by Parth Mittal.

CodeClass[34] - Number Theory in CP

posted Jan 13, 2017, 6:42 AM by Rounaq Jhunjhunu Wala

CodeClass[32] was organized by Foobar on 10th January 2017. 
Topics covered :  Number Theory
Prerequisites: None

This CodeClass was conducted by Parth Mittal.

CodeClass[33] | Square Root Decomposition

posted Oct 6, 2016, 9:56 AM by Rounaq Jhunjhunu Wala   [ updated Nov 2, 2016, 6:57 AM ]

Foobar's 34th CodeClass was on Square root decomposition. The session was taken by Parth Mittal and 25 people attended the session.

Resource: [For problems and further references.]

CodeClass[32] : Flow Networks

posted Sep 10, 2016, 9:03 AM by Aditi Mithal   [ updated Sep 10, 2016, 9:04 AM ]

CodeClass[32] was organized by Foobar on 9th September 2016. 
Topics covered :  Max Flow algorithms and related techniques
Prerequisites: Graphs, BFS, DFS, Elementary Algorithms

Excellent, authoritative resource on max flow: CLRS Chapter 26

List of resources you can use to understand and learn Dinic's algorithm (Google-fu might also help further):
Theory and implementations:

Problems to test your implementation on:
I can add more if there is interest.

This CodeClass was conducted by Anmol Kshetrimayum

The material/slides that were used, have been attached with this post. 

CodeClass[31] //Jr. - Introduction to Competitive Programming

posted Aug 23, 2016, 7:22 AM by Rounaq Jhunjhunu Wala   [ updated Aug 23, 2016, 7:22 AM ]

Foobar's 32nd CodeClass was on Introduction to competitive programming, which was conducted on 22nd August 2016 from 6:30 pm to 8:30 pm by Anmol Singh and Kushagra Arora. Topics like online judges, resources for CP and some puzzles and problems were discussed.

The slides used during the session are attached. The Problem discussed at the end is at the following URL:

Debugging Session by Alumni

posted Apr 13, 2016, 8:30 AM by Rounaq Jhunjhunu Wala   [ updated Apr 13, 2016, 10:19 AM ]

Foobar invited IIITD Alumni Kshitiz Bakshi and Deepanker Aggarwal (who are also the co-founders of FooBar, and are currently working at Adobe) to talk about debugging and tell us how it is "actually" done. The Session was held on April 12th, 2016; consisting of discussion about breakpoints, changing variable values on-the-fly, call stack, and many more things. They also shared some interesting industry experiences.
  • Some common terminology was discussed.
  • They exhibited the above debugging techniques on Microsoft Visual Studio.
  • Later, a exercise was posted on event page, to be done in JetBrains CLion.
Folks giving answers to the questions asked in the session were given chocolates :D.

CodeClass[30] - Shortest Paths and Minimum Spanning Trees

posted Mar 15, 2016, 10:17 AM by Rounaq Jhunjhunu Wala   [ updated Mar 15, 2016, 10:43 AM ]

Foobar's 31st CodeClass was on Graphs -Shortest Paths and Minimum Spanning Trees, which was conducted on 15th March 2016 from 6:00 pm to 7:30 pm by Parth Mittal. Topics like Disjoint set Forest Data structure, Kruskal's MST Algorithm and Dijkstra's Algorithm were discussed.

The Problems discussed during the session were:

1-10 of 39