Блог пользователя Omar_Hafez

Автор Omar_Hafez, история, 5 лет назад, По-английски

Hello, I am new to competitive programming and when I learn a new technique or algorithm I really don't know is it important to understand why this algorithm work or what is the math behind this algorithm ? or just I need to understand how it works and how to use it to solve the problems that this algorithm or technique fit in?

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +21 Проголосовать: не нравится

As a beginner , the major algorithms that you will require are binary search and prefix sums and............yeah that is pretty much it. Rest is all greedy, observations, math and sometimes combinatorics. That is all. As far as binary search and prefix sums are concerned, yes, you should get into their depths, these two are frequently used, doesn't matter if you are a div 1 or div 2 participant. For stuff like dp,yeah perhaps understanding how to write dp states and transitions is helpful,although you won't encounter too many dp problems as a beginner.As you gain experience,you may require more algorithms, but that is something that is better learnt while practising and spending time on harder problems

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +6 Проголосовать: не нравится

To get out of newbie rank, I think all one needs is decent math background (ie 80+ AMC score) and basic programming ability. I was ~1200 while knowing practically no algorithms but being an AIME qualifier.

I would say algorithms aren't really necessary to get out of newbie.

But when you do learn an algorithm, of course you should know why it works, the math behind it, etc. Codeforces is extensions of algorithms, not just copy-paste [algorithm].

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -31 Проголосовать: не нравится

In a interview it is better to explain it to the person interviewing you, on codeforces being good is just about having good tempelates.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

if the goal is to become a better problem solver then I think it is more important to understand why an algorithm works than being able to fit it in places.

try proving algorithms(if not a rigorous mathematical proof at least a proof that you can convince yourself with), this helps you in becoming a better problem solver + makes you more capable of designing your own algorithms.

so yep according to me understanding why "it" works is super important.