/Luv-CP-Course

My solutions and notes for Luv's Competitive Programming Course

Primary LanguageC++

Luv's CP Course

This repository contains/will contain :

  • Solutions to problems from the Competitive Programming Course offered by Luv on YouTube.
    The problem links are usually present in the video's description, but I've made sure to add them at the very top in each solution file.
  • Notes from certain episodes (generally syntax that I didn't know before).
  • Solutions to contest problems.

Why does there need to be a repository for solutions?

The need to create this repository arises from my personal experiences while taking this course. As a beginner, I encountered many difficulties while solving some of the problems. Sometimes the concept or the optimized approach required to get an AC for a problem was not discussed in the episode, which isn't a point of criticism honestly.
I do believe that 'The Art of Googling As A Programmer' must be encouraged, but in case of some rare problems, there just wasn't any way I could find a way to reduce the time complexity and get that AC verdict.
Competitive Programming or problems related to DSA in general, involve a lot of concepts and beginners might get intimidated when they come across a problem that otherwise seems like a cake-walk, but doesn't fulfil the requirements set by the OJ.

How to use this repository :

  • Firstly, if you don't get an AC on a problem, do not give up easily. Not every problem requires a special concept.
  • In case of WA, check for corner cases and if you're getting a TLE, try your best to optimize the code. This can be done by using basic techniques and leveraging existing resources (loops/memory management) efficiently too.
  • Try your best and if you believe there ain't no way you can get an AC, just skim through the solution (or parts of it) and then try to write the code on your own.

NOTE :

I'm assuming that you know readability is usually not considered as a point of concern in competitive programming. Therefore, the variable names and general nomenclature might look a bit shoddy.
Apart from that, I'm still learning and the solutions (or approach) to some problems might not be perfect. I just applied what I learned from the course itself.
In any case, if you find a more efficient or elegant way to solve a problem from the repo, I'd love to learn your approach. So if you wish to collaborate, please feel free to open a pull request.