# What is the best way to learn algorithms?

are you learn math when you learn to program and for algorithms
what is the best way to learn it

What do you mean by ‘learn algorithms’? An algorithm is a logical process for which every input has a single, consistent, predictable output.

Writing algorithms and solving math problems involve overlapping skills, but one does not teach you the other.

2 Likes

No, not really, not outside of extremely specific areas of maths. For example, JavaScript can be seen in some ways as an application of Lambda Calculus.

An algorithm is a description of a type of problem in terms of a set of steps you take to solve it. It is useful for describing some mathematical problems, but it isn’t maths.

thank you i know what is algorithm i ask about best course to learn it or resource for example is the math and algorithm domain in hackerrank is good or there is better way to learn
i have took courses like cs50 and programming languages in coursera and now i try to re learn math
in khan academy to understand cs can you help me

thank you i know what is algorithm i ask about best course to learn it or resource for example is the math and algorithm domain in hackerrank is good or there is better way to learn
i have took courses like cs50 and programming languages in coursera and now i try to re learn math
in khan academy to understand cs can you help me

At the minute the question is a little vague, because “algorithm” is just a description of a logical process. You can mathematically prove algorithms (there are languages to do this, like Coq or F*), but is that actually what you want? What is it you are trying to do that makes you think you need math knowledge? What is your aim here?

If you want to specifically learn algorithms, as in the academic definition, as in https://en.m.wikipedia.org/wiki/Introduction_to_Algorithms, then there is the algorithms course on Coursera which is based on that book.

sure what i want is learn algorithms in that way the goal is to understand computer and programming languages and become better in programming in general but for me i’m weak in math so now i re learn
math when i study liner algebra then i can understand calculus and also the theory of cs
like lambda and how computer works and programming languages in mathematical way
this is my goal if you know good resources to study that for math i can study hour in the day
i do this now and for programming from 2 to 3 hours

I’m bad at math and hate it with a passion Calculus isn’t required for core CS topics, discrete mathematics is far more applicable to computer science. If you aren’t sure what I just said here’s a quote from the wikipedia page for discrete mathematics:

Discrete mathematics therefore excludes topics in “continuous mathematics” such as calculus and analysis

So learning something like set theory, is a better use of your time then derivatives, especially when it comes to understanding programming better.

I always like to throw this resource too, its pretty heavy but it gives you the idea:
https://teachyourselfcs.com/#math
There’s a lot of other good resources on that site I go over from time to time to help refresh what I learned before.

If you’re looking for a MOOC to learn the topic of algorithmic theory, this is one of the best (although you should note that the course implements algorithms in Java and not JavaScript):

Alternately, you can just buy this book, which is a reference for the Coursera course and is a very good book on the subject: https://www.amazon.com/Algorithms-4th-Robert-Sedgewick/dp/032157351X/

If you don’t need a MOOC and can follow along with more of an “online textbook” equivalent, this resource is one of the best in covering data structures and algorithms (using Python, which has some similarities to JavaScript): http://interactivepython.org/courselib/static/pythonds/index.html

Lastly, the best printed books on algorithms available are these two, which are used extremely often in college-level computer science courses: