Computer Science is not just about programming, it is about application of logic and mathematical principles to solve problems. Writing a fast algorithm for any problem is a skill that can be learnt, and that’s where Project Euler comes in. Project Euler is an archive of questions that relate to computer science and math, and you are challenged to solve each one of them in code, through an algorithm that runs in less than 1 minute.
Project Euler has an ever-growing collection of 500+ such problems, and all of them can be accessed freely. You can start with simple problems (that over 500,000 users have solved) and eventually work your way to harder and harder questions. As of the time of publishing the post, the last question (question 579) has only been solved by 53 people. It starts fairly easy, but gets difficult quickly - so make yourself a community and challenge your friends as you work through the questions.
In fact, Project Euler has a community built around it. When you solve a question, you get access to a discussion thread about that question. That way you can look at other solutions and improve your own, and share your own solution too. The idea is to share and learn, and ensure that you solve the question with an algorithm that gives the answer in under 1 minute.
So here’s the first question: