News for hackers. Stuff that matters.
Re:Role of Algorithms by logdahl on Sunday October 08, 2023 @04:20AM (#37808743)
I have been wanting to get into competitive programming. I am quite an experienced programmer. Is leetcode still applicable, or are there other sites that are more suited?
Re:Role of Algorithms by jhck on Sunday October 08, 2023 @04:31AM (#37808807)
I think it's a fine place to start for the following reasons:

* It has a large selection of problems with many good starter problems.

* Once you've solved a problem, you can see how others have solved it (wish more sites had this feature).

* You don't have to write I/O code, so you can just focus on the problem.

Re:Role of Algorithms by matklad on Sunday October 08, 2023 @04:30AM (#37808799)
https://cses.fi/problemset/ is by far the best resource I know.
Re:Role of Algorithms by jhck on Sunday October 08, 2023 @04:58AM (#37808930)
Worth mentioning that there's a companion book to this website: https://cses.fi/book/book.pdf

The problems are indeed of very high quality. But it can be a difficult place to start. For example, even the very first problem has an overflow gotcha built into it. Also, Kadane's Algorithm appears as an early problem even though several mathematicians and computer scientists failed to discover it: https://en.wikipedia.org/wiki/Maximum_subarray_problem#Histo...

Re:Role of Algorithms by baobabKoodaa on Sunday October 08, 2023 @07:10AM (#37809507)
The CSES book and problemset are amazing resources for learning.
Re:Role of Algorithms by sinkwool on Sunday October 08, 2023 @05:31AM (#37809072)
Great resource, but it's hard to practice there as a beginner because there are no solutions (unless you solve the problem yourself). So you might have to get comfortable with being stuck. Which is fine when you're experienced, but will demotivate you if you're just starting.
Re:Role of Algorithms by natrys on Sunday October 08, 2023 @08:07AM (#37809755)
Interesting that they have Assembly, but not C.

In practice it seems most people just use C++ (87.5%). Add Python3 (7.5%) and Java (5%) and 99% of submissions are accounted for.

Re:Role of Algorithms by sinkwool on Sunday October 08, 2023 @05:41AM (#37809118)
Leetcode is fine: lots of supported languages, large community, lots of solutions and editorials.

Here are some more resources:

- USACO: https://train.usaco.org/ and https://usaco.guide/general/

- Codeforces: https://codeforces.com/ the de facto standard community for competitive programmers, regular contests with editorials, huge archive of problems (https://codeforces.com/problemset) with pretty accurate difficulty ratings so you can focus on problems of suitable difficulty if you want to progress quickly. They also have an incipient EDU section: https://codeforces.com/edu/courses that covers basic algorithms with practice problems.