Introductory tutorials for competitive programming _ CodeChef
Introductory tutorials for competitive programming _ CodeChef
Forgot Password?
Mathematics
1. Basic Number theory
Motivation and concept of modulo(mod)
Addition, subtraction and multiplication under modulo
Prime numbers(Some important properties)
Euclid’s GCD algorithm
Appendix: Division under modulo:
2. Sets
Venn diagrams
Set builder notations
subsets
Union, intersections, difference, membership
Set equality
Empty, Universal sets
Types of numbers and their symbols
4. Intro to combinatorics
Principle of counting
Selection
Permutation
Factorials
Combinations
5. Logarithms
Idea of what is exactly logarithm of a number.
Properties.
Examples
Want to get exclusive info on upcoming
6. Complexity Analysis Programming Contests, DSA Camps ?
Notions of efficiency
How to measure efficiency - express runtime as a function of input size Later Allow
We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our cookies if you continue to use our website. Okay
Examples of measuring efficiency of some problems
https://www.codechef.com/ioi/basics 1/5
7/11/22, 10:55 PM Introductory tutorials for competitive programming | CodeChef
Comparison of functions
Big-O notation
2. Data types
Recap of data types in Python
Declaring and initializing variables of different data types in C++.
Primitives datatypes in C++
a. int
b. long long
c. float
d. double
e. char
f. Bool
Overflow of values
Arrays
a. Motivation
b. Arrays in C++ including implementation
c. Difference between python lists and C++ array
3. Control flow
Decision Making statements
a. if
b. else if
c. else
and, or, not operators
Loops
a. for
b. while
4. I / O
Introduction(Motivation)
Concept of Streams
Input using cin
Input using getline
Output using cout
5. Functions
return types
Parameters
a. By value
b. By reference
6. Recursion
7. Notion of Structs
Basic Idea of an user defined data type.
Motivational Problem
Want to get exclusive info on upcoming
Implementation in C++
Programming Contests, DSA Camps ?
Later Allow
1. Searching and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our cookies if you continue to use our website.
We use cookies to improve your experience Okay
https://www.codechef.com/ioi/basics 2/5
7/11/22, 10:55 PM Introductory tutorials for competitive programming | CodeChef
Motivational Problem
Linear Search
Binary Search
a. Algorithm
b. Complexity
c. Code
Think about implementing your own lower_bound().
2. Sorting
Insertion sort
a. Algorithm
b. Visualization
c. Code
d. Complexity Analysis
Merge sort
a. Merging two small sorted arrays to get another sorted array(Algorithm).
b. The idea of Divide and Conquer
c. Algorithm
d. Visualization
e. Code
f. Complexity Analysis
1. Dynamic Programming(DP)
Concept of Subproblem of a problem and overlapping subproblems.
DP as Recursion+Memoization
Linear DPs
Multi-dimensional DP
a. Undirected Graphs
b. Directed Graphs Later Allow
We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our cookies if you continue to use our website. Okay
https://www.codechef.com/ioi/basics 3/5
7/11/22, 10:55 PM Introductory tutorials for competitive programming | CodeChef
Representation of graphs
a. Adjacency Matrix
b. Adjacency list
Depth First Search(Algorithm, Code, Visualization)
Breadth First Search(Algorithm, Code, Visualization)
(Optional) Shortest Path Algorithms(Algorithms, Codes, Visualizations)
3. Sieves
Sieve of Eratosthenes
Credits: We would like to thank Swetanjal Dutta, Parth Mittal and Kushagra Arora from the community for preparing these
tutorials. In case you would like to contribute in any kind of content, or can provide improvements in the existing one, you are
Programming Tools
Online IDE
CodeChef Certifications
Problem Setting
Learning Resources
Getting Started
Practice Problems
CodeChef Discuss
CodeChef Tutorials
Initiatives
Go for Gold
College Chapters
CodeChef Goodies
More
Want to get exclusive info on upcoming
Programming Contests, DSA Camps ?
CodeChef For Business
https://www.codechef.com/ioi/basics 4/5
7/11/22, 10:55 PM Introductory tutorials for competitive programming | CodeChef
Code Of Conduct
User Ranklist
Release Notes
Privacy policy
Terms
www.codechef.com
Follow Us
Later Allow
We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our cookies if you continue to use our website. Okay
https://www.codechef.com/ioi/basics 5/5