Skip to main content

বিগেনার কম্পিটিটিভ প্রোগ্রামরদের জন্য কিছু প্রয়োজনীয় টপিকস

Competitive Programming For Beginners


Topics
Subtopics
1. Importance of calculating time/memory complexity and how to do it
1. Vector ( insert , erase , iteration )
2. Queue
3. Stack
4. Deque
1. Map (C++)
2. Priority Queue (C++)
3. Set (C++)
4. Linked list using array
1. Bitwise operation (AND , OR , XOR and more)
2. Manipulation of bits
3. Some special use
1.Calculating GCD efficiently (Euclidean algorithm)
2.Sieve (finding prime numbers)
3.Bitwise sieve
4. Factorization
5. Modular Arithmetic ( addition , multiplication , calculating bigmod)
6. Fermat's little theorem and its use
7. Totient function
8. Combinatorics (factorials , counting problem)
1. Bubble sort
2. Insertion sort
3. Counting sort
4. Selection sort
5. Quick sort
6. Merge sort
1. Introduction to recursion
2. Backtracking
1. Introduction to greedy algorithm and ad-hoc problems
1. What is graph theory?
2. How to store edges? (using vector and array)
3. How to traverse a graph? (DFS , BFS)
4. How to solve problem using graph theory
5. Connected Component (undirected graph)
6. Bicoloring problem
7. Shortest path problem (weighted and unweighted graph)
8. Longest path problem (tree)
1. What is dynamic programming?
2. State of dp and calculating time and memory complexity
3. Coin change
4. Knapsack
5. nCr
6. Longest Increasing subsequence ( n^2 )
7. Bitmask dp

Comments

Popular posts from this blog

NT Part 4: Mobius Function Part 1. The Introduction

  What is mobius function? This function is notated as  .  This function has lots of definitions. However, the main definition is the following.  is   if   or   is square-free and has even number of prime divisors.  is   if   is square-free and has odd number of prime divisors.  is   if   is not square-free.  also has a lot of interesting properties that make   so important.  for all  ,  and   is multiplicative. (A function   is multiplicative if   for all  . ) How do we calculate   fast? Again, we can tweak the Eratosthenes's Sieve a little bit. void preprocess ( void ) { int i, j ; for ( i = 1 ; i <= 111100 ; i ++ ) { mu [ i ] = 1 ; primechk [ i ] = 1 ; } primechk [ 1 ] = 0 ; for ( i = 2 ; i <= 111100 ; i ++ ) { if ( primechk [ i ] == ...

NT Part 1:GCD, LCM, Euclidean Algorithm

  The definitions of GCD and LCM are well-known, (and taught in middle school I think) I will skip the definitions. Also, since  ,  calculating GCD is equivalent to calculating LCM. Now, how do we calculate the GCD of two numbers? A naive solution would be iterating over all positive integers no more than  . This will get the GCD in  ,  very very slow. We can calculate the GCD of   in   using Euclidean Algorithm. This algorithm uses the easy-to-prove fact  ,  where   is the remainder when   is divided by  ,  or just a%b. We can now use the following code. #include <iostream> using namespace std ; int gcd ( int u, int v ) { return u % v == 0 ? v : gcd ( v,u % v ) ; } int main ( void ) { int x, y ; cin >> x >> y ; cout << gcd ( x,y ) ; } How do we prove that this algorithm is  ?  Well, let's suppose that we started with  . Then...

কোডফোর্সেস বেসিক প্রবলেম লিস্ট ১

IMPLEMENTATION  Problem 1: Codeforces 835A Problem 2: Codeforces 935B Problem 3: Codeforces 868A Problem 4: Codeforces 868B LOOPS (NOT NESTED) Problem 1: Codeforces 839A Problem 2: Codeforces 939A Problem 3: Codeforces 893A Problem 4: Codeforces 935A Problem 5: Codeforces 961A Problem 6: Codeforces 828A Problem 7: Codeforces 867A Problem 8: Codeforces 939B NESTED LOOPS  Problem 1: Codeforces 894A Problem 2: Codeforces 897A Problem 3: Codeforces 822B Problem 4: Codeforces 828B Problem 5: Codeforces 886A (Can also be solved using sorting) Problem 6: Codeforces 907A Problem 7: Codeforces 22B MATH Problem 1: Codeforces 869B  (Uses a loop) Problem 2: Codeforces 875A  (Uses a nested loop) Problem 3: Codeforces 922B  (Uses a nested loop)