Skip to main content

How To Became Master in Competitive Programming

How To Became Master in Competitive Programming

Competitive programming is nowadays a popular spot.Which will increase your thinking capacity out of box.By joining link you get a solution.People are nowadays making career in competitive programming and get a good job in multinational companies like -google,microsoft,amazon etc.
You should know the basic fundamental of math before entering in competitive programming.
Topic for Beginners-
  1. Data Structure-Data Structure is way to store value.This means you have something to store value.There are lot of Data Structure in language (eg.CPP,C etc) like-Vector ,Array,map,set,multiset,stack,queue,deque etc.                                                                                   
  2. Complexity Analysis- complexity analysis is very important because you can not do any calculation in any time .There are time limit is given you have to find out the solution which will be fit in given time limit.Without understanding of time limit or complexity like you are in war without swords.                                                                                                                                    
  3. Basic fundamental of mathematics-Mathematics is the root of competitive programming without mathematics like you are making making spicy dishes without chilli.You have to good understanding of addition subtraction,multiplication etc.                                                                         
  4. Recursion-You have to apply know the recursion because one day in competitive programming you stuck while you find that same step is repeating.                                                                          
  5. Greedy Algorithms-Greedy algorithm is that algorithm when you have to find minimum/maximum as the name suggest Greedy means this you have to do step in greedy way.You have to choose locally optimal choice.                                                                                  
  6. Dynamic Programming-Dynamic programming is the technique which is used when you find a optimization problem.Optimization meaning minimum or maximum .And one thing always happen in dynamics programming is that current calculation used previous calculations.                
  7. String Algorithms-When you enter in the dynamic programming you find that most of the problem based on string .String is the group of character.You have to know the basic technique like reverse string,delete character in string etc.                                                                                  
  8. Sorting-Sorting is the way to order number in the increasing or decreasing way that are lot of algorithms based on sorting like -mergesort,bubble sort,selection sort etc.                                        
  9. Searching-Searching as the name suggest it is using for searching a element in the given data structure,There are Mainly  two Searching Algorithms .                                                                    a)Linear Search  b)Binary Search                                                                                                       
  10. Prime +Euclid's GCD Algorithms-In most of the number theory you will figure out that technique used Euclid's algorithm and prime factorization.
Advance Topic-
  1.  Graph-When you move forward to advanced problem problem contain graph theory like traversing a graph.Traversing Technique like-DFS,BFS etc.Shortest Path,Strongly connected components etc.                                                                                                                                   
  2. Disjoint Set Union- When we talk about divide a number in group one thing which comes is DSU.It is a DataStructure that track the element which is divided in groups.                                    
  3. Segment Trees-It comes when you have to work in a range in strict time limit like you have to find the minimum/maximum in given range.Sum of range etc.                                                         
  4. Heaps-Heap is a data structure which is implemented using tree.It is also called priority queue.     There are Two type of Heap a)min heap b)max heap                                                                        
  5. Binary Index Tree-It is also called Fenwick Tree..It is used to perform query efficiently like updation  etc.                                                                                                                                        
  6. Lowest Common Ancestors
  7. Divide and conquer-As the name suggest is divide and use calculation.It is used recursion some algorithms like-merge sort used divide and conquer technique.                                                         
  8. Advanced Dynamic Programming
  9. Sieve of Eratosthenes- it is a technique which is used to find prime number is an ancient algorithm.
If there is an mistake please mention in comment section and any feedback /suggestion mention in  comment section.
Happy Coding 😍 

Comments

Post a Comment

Popular posts from this blog

Create a socket for HTTP for web page upload and download

Create a socket for HTTP for web page upload and download. Aim: To write a java program for socket for HTTP for web page upload and download . Algorithm 1.Start the program. 2.Get the frame size from the user 3.To create the frame based on the user request. 4.To send frames to server from the client side. 5.If your frames reach the server it will send ACK signal to client otherwise it will send NACK signal to client. 6.Stop the program Program : Client import javax.swing.*; import java.net.*; import java.awt.image.*; import javax.imageio.*; import java.io.*; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public class Client{ public static void main(String args[]) throws Exception{ Socket soc; BufferedImage img = null; soc=new Socket("localhost",4000); System.out.println("Client is running. ");  try { System.out.println("Reading image from disk. "); im...

Write a code simulating ARP /RARP protocols

   Write a code simulating ARP /RARP protocols . Aim:        To write a java program for simulating ARP/RARP protocols ALGORITHM: server 1. Create a server socket and bind it to port. 2. Listen for new connection and when a connection arrives, accept it. 3. Send server ‟ s date and time to the client. 4. Read client ‟ s IP address sent by the client. 5. Display the client details. 6. Repeat steps 2-5 until the server is terminated. 7. Close all streams. 8. Close the server socket. 9. Stop. Client 1. Create a client socket and connect it to the server ‟ s port number. 2. Retrieve its own IP address using built-in function. 3. Send its address to the server. 4. Display the date & time sent by the server. 5. Close the input and output streams. 6. Close the client socket. 7. Stop. Program Program for Address Resolutuion Protocol (ARP) using TCP Client: import java.io.*; import java.net.*; impor...

Write program to find ε – closure of all states of any given NFA with ε transition.

 Write program to find ε – closure of all states of any given NFA with ε transition. Agenda 1.Program 2.Input/Output 1.Program #include <stdio.h> #include <string.h> char  result[ 20 ][ 20 ], copy[ 3 ], states[ 20 ][ 20 ]; void  add_state( char  a[ 3 ],  int  i) {   strcpy(result[i], a); } void  display( int  n) {    int  k =  0 ;   printf( "nnn Epsilon closure of %s = { " , copy);    while  (k < n) {     printf( " %s" , result[k]);     k++;   }   printf( " } nnn" ); } int  main() {   FILE * INPUT;   INPUT = fopen( "input.dat" ,  "r" );    char  state[ 3 ];    int  end, i =  0 , n, k =  0 ;  ...