<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: velu vijay</title>
    <description>The latest articles on DEV Community by velu vijay (@veluvj).</description>
    <link>https://dev.to/veluvj</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F318158%2F610a61fd-b527-486a-85b3-76bc11abb3fc.jpg</url>
      <title>DEV Community: velu vijay</title>
      <link>https://dev.to/veluvj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/veluvj"/>
    <language>en</language>
    <item>
      <title>How to Competitive Programming
</title>
      <dc:creator>velu vijay</dc:creator>
      <pubDate>Thu, 02 Jul 2020 06:20:30 +0000</pubDate>
      <link>https://dev.to/veluvj/how-to-competitive-programming-19k7</link>
      <guid>https://dev.to/veluvj/how-to-competitive-programming-19k7</guid>
      <description>&lt;blockquote&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;" Programming make us to think " 
   -- Steve  Jobs
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;By proving this statement competitive programming evolves. It is a &lt;strong&gt;Mind Sport&lt;/strong&gt; , people who  participating were considered as &lt;strong&gt;Sport Programmers&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  LEVEL 1 :
&lt;/h1&gt;

&lt;p&gt;pick a language ( c/c++, java, python)&lt;/p&gt;

&lt;p&gt;Four languages are available to complete a given in competitive programming. C/C++ were prefered by most of the  coders because of its &lt;strong&gt;Speed&lt;/strong&gt; and &lt;strong&gt;Libraries&lt;/strong&gt; ( &lt;a href="http://www.cplusplus.com/reference/stl/"&gt;STL Standard Template Library&lt;/a&gt; ). Comparing  with C/C++ other two languages were slow at execution.&lt;/p&gt;

&lt;p&gt;Following links for C++ tutorials and references :-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="http://www.cplusplus.com/doc/tutorial/"&gt;CPP Tutorials (official cpp website, providing the cpp tutorials from basic)&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.tutorialspoint.com/cplusplus/cpp_web_programming.htm"&gt;Tutorials point (Learn cpp with simple and elegant at Tutorials point)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  LEVEL 2 :
&lt;/h1&gt;

&lt;p&gt;DSA(Data Structures &amp;amp; Algorithms) and Maths &lt;/p&gt;

&lt;p&gt;Eventhough, you completely learned  C++, DSA and Maths  takes a major role in Competitive Programming.  The Problems were based on the Logicial and Non-Real world related things. In order to complete the levels you must learn the DSA and Maths.&lt;/p&gt;

&lt;p&gt;Most Important DSA and Maths  topics:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dijkstra's&lt;/strong&gt; - depending on the type of contest, you might see basic pathfinding problems, or you might see problems with non-obvious reductions to pathfinding problems. Whenever you have a cost minimization problem with a (reasonably small) finite number of states, an initial state and a target state, you can look at it as a pathfinding problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bellman-Ford&lt;/strong&gt;  is useful for pathfinding when edges may have negative costs. For example if you're navigating a maze with potions which boost health and hazards which lower it, Bellman-Ford would be a great approach.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Floyd-Warshall&lt;/strong&gt;  is useful for computing all paths. It is sometimes used in problems where you don't need all paths, because it's so easy to implement. It is slower than other pathfinding algorithms though, so whether Floyd-Warshall is an option depends on the graph size.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Edmonds-Karp&lt;/strong&gt;  for max flow/min cut problems. One common application is bipartite matching problems. For example, given N people, M food items, and a list of each person's food allergies, how many people can you feed?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Hungarian algorithm&lt;/strong&gt;  for assignment problems. Similar to the above, but in these problems the edges have weights, and we're maximizing the total weight rather than just the number of matchings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The sweep line&lt;/strong&gt;  "algorithm" (more of a general approach really) is useful for various geometric problems, like the nearest pair problem. Also useful for a variety of intersection-related problems, like finding intersecting line segments, or conflicting calendar events.&lt;br&gt;
Graham scan or another convex hull algorithm, for problems such as building a minimal fence to enclose animals.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An algorithm for finding &lt;strong&gt;strongly connected components&lt;/strong&gt; , such as Tarjan's.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prim's&lt;/strong&gt;  algorithm for minimum spanning trees.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Knuth-Morris-Pratt&lt;/strong&gt; algorithm for string searching.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Maths:  &lt;strong&gt;Number Theory&lt;/strong&gt; , &lt;strong&gt;Discrete Mathematics&lt;/strong&gt; , &lt;strong&gt;combinatorics&lt;/strong&gt;,  &lt;strong&gt;graph theory&lt;/strong&gt;, &lt;em&gt;geomentry&lt;/em&gt;,  &lt;strong&gt;string analysis&lt;/strong&gt; .&lt;/p&gt;

&lt;h1&gt;
  
  
  LEVEL 3 :
&lt;/h1&gt;

&lt;p&gt;welcome to wild life :)&lt;/p&gt;

&lt;p&gt;After completing two levels, you can start participating in online programming contests. There are bunch of websites available today and try to complete the beginner's level and then move on to  Montly, Weekly and Yearly challenges. &lt;/p&gt;

&lt;p&gt;websites which providing competitive programming challenges:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; &lt;a href="https://www.spoj.com/"&gt;SPOJ&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://codeforces.com/"&gt;CodeForces&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.codechef.com/"&gt;CodeChef&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.topcoder.com/"&gt;TopCoder&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.hackerearth.com/"&gt;HacerEarth&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://codingcompetitions.withgoogle.com/codejam"&gt;Google Code Jam&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.facebook.com/hackercup/"&gt;Facebook Hacker Cup&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  LEVEL 4 :
&lt;/h1&gt;

&lt;p&gt;Process of  Contests&lt;/p&gt;

&lt;p&gt;Ranks were distributed by number of problems solved, time taken to got "Accepted" for a program and even more qualities such as execution time, length of the program, and algorithms.  Red , Blue and Green badges were available for top 3 rank coders.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Oy2BRV1H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1593433994289/hmdS7VHRl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Oy2BRV1H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1593433994289/hmdS7VHRl.png" alt="Screenshot from 2020-06-29 18-01-55.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Solutions of a problem were available on the websites forum but don't look at those. Take a paper and write the possiblities of algorithm to solve a given problem. Take time to solve it. Even after a hour, you can't get the results then move on to the forum for references. Be patient and consistent with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits and Critisim of  Competitive  Programming
&lt;/h2&gt;

&lt;p&gt;Participation in programming contests may increase student enthusiasm for computer science studies. The skills acquired in Competitive like programming contests also improve career prospects, as they help to pass the "technical interviews", which often require candidates to solve complex programming and algorithmic problems on the spot.&lt;/p&gt;

&lt;p&gt;There has also been criticism of competitive programming, particularly from professional software developers. One critical point is that many fast-paced programming contests teach competitors bad programming habits and code style (like unnecessary use of macros, lack of OOP abstraction and comments, use of short variable names, etc.).  As real software projects typically have many thousands of lines of code and are developed by large teams over long periods of time.&lt;/p&gt;

&lt;p&gt;Yet another sentiment is that rather than "wasting" their time on excessive competing by solving problems with known solutions, high-profile programmers should rather invest their time in solving real-world problems.  &lt;/p&gt;

&lt;h3&gt;
  
  
  References:-
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://sportprogramming.blogspot.com/2014/07/getting-started-with-sport-of.html"&gt;Getting started&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://developerinsider.co/big-o-notation-explained-with-examples/"&gt;Big O Notation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.quora.com/What-is-competitive-programming-2"&gt;Quora&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://web.stanford.edu/class/cs97si/"&gt;Introduction to programming contests&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.hackerearth.com/practice/notes/kaushik.mv3/learn-to-code-by-competitive-programming/"&gt;Learn to code by Hacker Earth &lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.topcoder.com/community/competitive-programming/tutorials/"&gt;Competitive programming tutorials&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://cp-algorithms.com/"&gt;Related Algorithms&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.hackerearth.com/practice/codemonk/"&gt;CodeMonl&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.hackerearth.com/practice/math/number-theory/basic-number-theory-1/tutorial/"&gt;Number Theory&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://cs.stanford.edu/group/acm/SLPC/notebook.pdf"&gt;Stanford references&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://codeforces.com/blog/entry/57282"&gt;CodeForces Blog #1&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://codeforces.com/blog/entry/13529"&gt;CodeForces Blog #2&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/"&gt;Introductions to Algorithms&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.commonlounge.com/discussion/5d2822257dfa49328d85fd27cf114441"&gt;Discussion&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.cppreference.com/w/cpp/header"&gt;Cpp refernces&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.quora.com/How-do-I-learn-competitive-programming-online"&gt;Quora&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>computerscience</category>
      <category>competitiveprogramming</category>
      <category>cpp</category>
      <category>datastructures</category>
    </item>
  </channel>
</rss>
