{"componentChunkName":"component---src-templates-blog-post-jsx","path":"/blogs/competitiveProgramming","result":{"data":{"blog":{"frontmatter":{"title":"COMPETITIVE PROGRAMMING","thumbnail":"blog17","date":"September 27, 2020","dsaCppCodeFile":null},"excerpt":"<div class=\"my-2 p-2\">\n              <h4>What is CP?</h4>\n              <div class=\"m-2\">\n                <p>\n                  Programming is fun, Programming is an exercise for your brain,\n                  Programming is a mental sport and when this sport is held over\n                  the internet involving sport programmer as a contestant then\n                  it is called Competitive Programming.\n                </p>\n                <p>\n                  CP is like a mind sport where you use algorithms and your\n                  logical thinking to play well.\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Problems in CP</h4>\n              <div class=\"m-2\">\n                <p>\n                  The problems in CP are neither normal programming questions\n                  like- \"WAP to find sum of 2 numbers or factorial of a number\"\n                  nor basic DSA like- \"WAP to stack implement using arrays or to\n                  reverse a binary tree\".\n                </p>\n                <p>\n                  You are given a real world problem to solve them and find an\n                  optimistic solution through programs. The program is mainly\n                  judged on 2 important basis- <strong>Time</strong> and\n                  <strong>Space</strong> complexity.\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Why CP?</h4>\n              <div class=\"m-2\">\n                <p>\n                  Once you step into programming, you just don’t learn how to\n                  code but you also learn the <strong>art of thinking</strong>,\n                  by breaking your code into smaller chunks and then using your\n                  logic-based creativity to solve a problem from different\n                  angles.\n                </p>\n                <p>\n                  So the one and clear goal behind these competitive programming\n                  is to prepare a programmer such that their logical ability\n                  increases and they are able to write code for any challenging\n                  situation.\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Is it hard?</h4>\n              <div class=\"m-2\">\n                <p>\n                  Many people(including me) gets freezed out after seeing the\n                  problems in CP and get thoughts like I can't do this, It's not\n                  for me and I shall ignore this. No, this is absolutely wrong.\n                </p>\n                <p>\n                  Remember we as high school students had learnt the Newton's\n                  laws of motion and hardly knew the equations, that's it. So by\n                  just knowing these basic equations could we solve any IIT\n                  question given at that time? Think about it!\n                </p>\n                <p>\n                  CP is all about advanced applications of the basic algorithms,\n                  logics, DSA and maths that we learnt(in any programming\n                  language).\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Can I ignore CP?</h4>\n              <div class=\"m-2\">\n                <p class=\"display-4 text-danger\">NO!</p>\n                <p>\n                  Programming is a challenging role and once you enter this\n                  field you will encounter new challenges and you may have to\n                  solve some problems which no one has solved before or their\n                  solution doesn’t exist anywhere.\n                </p>\n                <p>\n                  Another reason is that a lot of big companies like Google,\n                  Facebook. Microsoft, Amazon hires through competitive\n                  programming. So if you want to get into these companies then\n                  you really need to get your hands dirty in competitive\n                  programming.\n                </p>\n                <p>\n                  These companies no longer ask for a degree certificate instead\n                  they see your skills in problem solving. CP helps alot in\n                  improving coding skills.\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Know few points before starting CP</h4>\n              <div class=\"m-2\">\n                <p>\n                  Always remember one thing that there involves no magic to be a\n                  good problem solver in CP. It includes lots of dedication,\n                  hardwork, practice and consistency.\n                </p>\n                <p>\n                  You should move <strong>gradually</strong> from zero to top\n                  level which invloves lots of ups and downs and burden that you\n                  can't solve a problem or can't resolve a bug.\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Benefits of CP</h4>\n              <ul class=\"px-4\">\n                <li>Improves logical thinking</li>\n                <li>Improves coding skills</li>\n                <li>Helps to become a good problem solver</li>\n                <li>Makes you smarter</li>\n                <li>Helps in cracking coding interviews</li>\n              </ul>\n            </div>\n            <div class=\"my-2 p-2\">\n              <p>\n                Also read:\n                <a href=\"/blogs/basicRoadmapForCP\"\n                  >Basic roadmap for Competitive Programming</a\n                >\n              </p>\n            </div>\n","html":"<div class=\"my-2 p-2\">\n              <h4>What is CP?</h4>\n              <div class=\"m-2\">\n                <p>\n                  Programming is fun, Programming is an exercise for your brain,\n                  Programming is a mental sport and when this sport is held over\n                  the internet involving sport programmer as a contestant then\n                  it is called Competitive Programming.\n                </p>\n                <p>\n                  CP is like a mind sport where you use algorithms and your\n                  logical thinking to play well.\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Problems in CP</h4>\n              <div class=\"m-2\">\n                <p>\n                  The problems in CP are neither normal programming questions\n                  like- \"WAP to find sum of 2 numbers or factorial of a number\"\n                  nor basic DSA like- \"WAP to stack implement using arrays or to\n                  reverse a binary tree\".\n                </p>\n                <p>\n                  You are given a real world problem to solve them and find an\n                  optimistic solution through programs. The program is mainly\n                  judged on 2 important basis- <strong>Time</strong> and\n                  <strong>Space</strong> complexity.\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Why CP?</h4>\n              <div class=\"m-2\">\n                <p>\n                  Once you step into programming, you just don’t learn how to\n                  code but you also learn the <strong>art of thinking</strong>,\n                  by breaking your code into smaller chunks and then using your\n                  logic-based creativity to solve a problem from different\n                  angles.\n                </p>\n                <p>\n                  So the one and clear goal behind these competitive programming\n                  is to prepare a programmer such that their logical ability\n                  increases and they are able to write code for any challenging\n                  situation.\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Is it hard?</h4>\n              <div class=\"m-2\">\n                <p>\n                  Many people(including me) gets freezed out after seeing the\n                  problems in CP and get thoughts like I can't do this, It's not\n                  for me and I shall ignore this. No, this is absolutely wrong.\n                </p>\n                <p>\n                  Remember we as high school students had learnt the Newton's\n                  laws of motion and hardly knew the equations, that's it. So by\n                  just knowing these basic equations could we solve any IIT\n                  question given at that time? Think about it!\n                </p>\n                <p>\n                  CP is all about advanced applications of the basic algorithms,\n                  logics, DSA and maths that we learnt(in any programming\n                  language).\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Can I ignore CP?</h4>\n              <div class=\"m-2\">\n                <p class=\"display-4 text-danger\">NO!</p>\n                <p>\n                  Programming is a challenging role and once you enter this\n                  field you will encounter new challenges and you may have to\n                  solve some problems which no one has solved before or their\n                  solution doesn’t exist anywhere.\n                </p>\n                <p>\n                  Another reason is that a lot of big companies like Google,\n                  Facebook. Microsoft, Amazon hires through competitive\n                  programming. So if you want to get into these companies then\n                  you really need to get your hands dirty in competitive\n                  programming.\n                </p>\n                <p>\n                  These companies no longer ask for a degree certificate instead\n                  they see your skills in problem solving. CP helps alot in\n                  improving coding skills.\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Know few points before starting CP</h4>\n              <div class=\"m-2\">\n                <p>\n                  Always remember one thing that there involves no magic to be a\n                  good problem solver in CP. It includes lots of dedication,\n                  hardwork, practice and consistency.\n                </p>\n                <p>\n                  You should move <strong>gradually</strong> from zero to top\n                  level which invloves lots of ups and downs and burden that you\n                  can't solve a problem or can't resolve a bug.\n                </p>\n              </div>\n            </div>\n            <div class=\"my-2 p-2\">\n              <h4>Benefits of CP</h4>\n              <ul class=\"px-4\">\n                <li>Improves logical thinking</li>\n                <li>Improves coding skills</li>\n                <li>Helps to become a good problem solver</li>\n                <li>Makes you smarter</li>\n                <li>Helps in cracking coding interviews</li>\n              </ul>\n            </div>\n            <div class=\"my-2 p-2\">\n              <p>\n                Also read:\n                <a href=\"/blogs/basicRoadmapForCP\"\n                  >Basic roadmap for Competitive Programming</a\n                >\n              </p>\n            </div>"},"thumbnail":{"childImageSharp":{"fluid":{"tracedSVG":"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='400'%20height='225'%20viewBox='0%200%20400%20225'%20preserveAspectRatio='none'%3e%3cpath%20d='M0%20108a1409%201409%200%20000%20114v3h401V0H252v5l-1-3c-1-2-2-2-6-2l-6%201h-4L115%200H0v108m289-34a866%20866%200%20010%2023v11h5V91l-1-18-3-3c-1-3-1-3-1%204M44%2080l-2%2013c-5%209-5%2019%201%2031%202%204%202%205%201%206s-1%201%201%201%202%200%201-7c-2-8-2-8%2011-8l11%201%202%206c3%2012%203%2014-7%2013-3%200-3-1-3-4%200-6-3-5-3%200-1%204-1%204-5%204l-3%201%202%201c2%200%201%207-2%209-2%202-2%203-1%204%202%203%2035%203%2037%201v-2l1-1c2-1-1-1-13-1H58v-2c0-3%201-4%202-2h12l4-3c1-3%202-3%209-3%208%200%2010%201%2010%204s1%202%205-1c3-3%203-3%2013-3l10-1-2-1-3-3c-2-2-3-3-5-3s-2-1-1-4c1-2%202-3%205-3%202%200%203%200%203-2a196%20196%200%20012-22l1-3-22-1-21-1h20c22%200%2022%200%2019-5l-2-9v-6l-11-1-11%201-2%201-2-1c0-2-21-1-23%201h-2c0-2-2-2-11-2H44v7m134-5c-2%202-3%2020-2%2027%201%205%202%206%208%206%205%200%207-3%207-9%200-4%200-4-2-4-3%200-3%200-3%203%200%204-2%207-4%205-2-1-1-25%201-25%201%200%202%201%202%204s1%204%203%204h3v-5l-2-6c-2-3-9-2-11%200m18%200c-3%203-3%2028-1%2031%203%203%2010%203%2012%200%203-4%203-28%200-31s-9-3-11%200m16%2016v17h6v-8c0-4%200-6%201-5%202%2013%202%2013%205%2013%204-1%204-2%206-12%201-5%201-5%201%203%200%209%200%209%202%209%204%200%204-7%203-24V73h-4c-3%200-4%200-4%202a98%2098%200%2000-4%2021l-2-14-1-9h-9v18m28-8v18c0%207%200%207%203%207%202%200%202%200%202-6s0-6%202-6c6%200%208-3%208-12s-2-11-10-11h-5v10m17%208v17h4c3%200%203%200%203%204l2%206c2%202%202%205%202%2018l1%2015h2c2%200%203-1%203-9l1-5%201%209c2%204%202%205%205%205%202%200%202-1%204-5l1-8%201%204c0%207%201%209%202%209%203%200%204-2%204-16%200-10%200-13%201-12l1%205v3l1%2011c0%209%200%209%203%209h2v-11c0-6%200-9%201-7l3%2016c0%202%206%203%206%201l3-19c1-2%201%202%201%208%200%2012%200%2012%202%2012s3-1%203-18v-17h-4l-4%201-2%206-1%2010c0%205-2%206-2%201l-1-11-2-6-4-1-4%201-4-2-8-5-3-1V96c0-16%201-18%203-18l2-2c0-3%200-3-7-3-8%200-8%200-8%203l-1%203v-3c0-3%200-3-6-3h-7v18m39-15c0%202%201%202%203%202h2v30h3c2%200%202-1%202-7%200-13%201-23%203-23l2-2c0-3%200-3-7-3-8%200-8%200-8%203m18%2015v17h5V73h-5v18m8-17l1%2017%203%2017h4c5%200%204%202%206-18%203-16%203-17%200-17s-3%201-5%2010c0%207-1%206-3-4-1-4-2-6-4-6l-2%201m19%200v32c0%202%202%202%206%202%206%200%206%200%206-2%200-3%200-3-3-3h-4v-5c0-5%200-5%203-5%205-1%206-5%201-5h-4V78h4c3%200%203%200%203-2%200-3%200-3-6-3l-6%201m-141%204l-1%2013c0%2012%201%2015%203%2012%202-1%202-13%200-14v-4c2-1%202-4%201-6%200-2-2-3-3-1m74%202l-2%201c-2%200-2%200-3%2016v16c0%202%200%203%203%203l5%201a193%20193%200%20014%2021c1-12%203-22%205-22l1-1c0-1-5-5-7-5-4%200-4-2-4-17%200-14-1-18-2-13M64%2097l-3%205-1%204c0%202%200%202%207%202s8-1%208-7c0-1%200-2%201-1%202%201%201-4-1-5-4-3-8-2-11%202m153%2017v4c-3%204-3%2028%200%2031s8%203%2011%200c2-2%204-17%202-17l-1%201-3%201c-2%200-5%205-2%205l1%204c0%203%200%203-2%203s-3-1-3-12l1-13c1-2%204%201%204%205%200%203%200%203%202%203%203%200%204-2%203-7-1-4-3-6-7-7l-5-1-1-1v1m-54%202c-2%200-2%200-2%2013v14l-4-2c-4-3-6-2-6%200l2%202c4%200%208%202%208%205%200%202%201%203%203%203s2%200%202-6c1-5%201-6%204-6%205-2%206-4%206-15l-1-5c-2-2-8-4-12-3m39%200c-5%200-6%203-6%2012%200%205%200%208-1%207h-1l-1-8c0-10-1-11-9-11l-5%201v34h2c2%200%203-1%203-6l1-6%201%205c2%206%204%208%206%207s2-1%200-6c-1-6-1-7%201-7%203-1%203%200%203%205%201%206%202%208%208%208%207%200%209-2%208-12l1-10v-1l-1-5c-1-6-3-8-10-7m155%200c-4%201-5%204-5%2018%201%2015%202%2017%208%2017%205%200%207-3%208-10v-6h-4c-4%200-6%203-3%204%202%201%201%208-1%208s-3-13-2-21c1-7%203-8%204-1%200%203%201%204%203%204s2%200%202-5-2-8-4-8h-6m-124%205v10a1020%201020%200%20012%2020c2%200%203-1%203-6l1-6%202%206c1%205%202%206%204%206%203%200%203%200%201-7-1-5-1-5%201-9l1-9c-1-8-3-10-10-10h-5v5m21-3l-4%2030c0%205%204%204%205-2s5-6%205%201c1%203%201%204%204%204%202%200%202%201%201-16-3-20-2-19-7-19-3%200-4%200-4%202m69%2015l1%2018h5v-35h-6v17m9%201v17h5v-14l-1-14%201%209%203%2014c1%205%201%205%205%205h4v-35h-5v11c0%206%200%2010-1%209l-2-11-1-9h-8v18'%20fill='%23d3d3d3'%20fill-rule='evenodd'/%3e%3c/svg%3e","aspectRatio":1.7699115044247788,"src":"/static/e022ae37b1ab092f69727e3f9e82326a/ee604/blog17.png","srcSet":"/static/e022ae37b1ab092f69727e3f9e82326a/69585/blog17.png 200w,\n/static/e022ae37b1ab092f69727e3f9e82326a/497c6/blog17.png 400w,\n/static/e022ae37b1ab092f69727e3f9e82326a/ee604/blog17.png 800w,\n/static/e022ae37b1ab092f69727e3f9e82326a/f3583/blog17.png 1200w,\n/static/e022ae37b1ab092f69727e3f9e82326a/e4d72/blog17.png 1280w","sizes":"(max-width: 800px) 100vw, 800px"}}}},"pageContext":{"blog":"competitiveProgramming","thumbnail":"thumbnails/blog17.png"}},"staticQueryHashes":["2987289216","63159454"]}