Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used to do some "competitive programming" back in university - which I think helped me grasp quite a few Mathematics concepts.


Which mathematical concepts would you say that you got to grasp?

Having done competitive programming also, I would not say that it made any difference for my mathematical perception.


To name a few concepts: "Permutation & Combination", "Proofs with induction", "Probability". I did learn some of them from university courses, but writing code for them(in terms of coding problems) helped cement few of the them for me.


How did you apply induction proofs in competitive programming?

Even using recursion is rarely a good idea as you loose control with your memory layout.

And using a language that supports the concept of proof by induction would surely leave you on the absolutely last place for competitive programming as most of the algorithms used use guarantees that are extremely difficult to reason about even with some of the most recent advances in formal methods.

I do see how combinatorics work with competitive programming, though. and to an extend also probability theory, though I never used any probabilistic algorithms myself.


> Even using recursion is rarely a good idea as you loose control with your memory layout.

Used recursion at tons of Codeforces / ICPC problems with some caching(commonly known as "dynamic programming")


I think most problem sets would be hard to solve without use of dynamic programming, irrespective of recursion or not. But yes, recursion with memorisation/accumulation would be a good place to start.


> Even using recursion is rarely a good idea as you loose control with your memory layout.

Functional programming? NOT TODAY!


It seems like Java and Python are only just starting to get a place in COMPETETIVE programming :) I definitely think we will have to wait before we get stuff like Haskell or Idris in there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: