Answer the question
In order to leave comments, you need to log in
How to study algorithms?
Decided to learn about algorithms. After some time I settled on the book Robert Sedgwick, Kevin Wayne - Algorithms / Algorithms in Java.
Read the first 70 pages. At first it was said that special knowledge in mathematics is not needed to study this book. It seems like my version ... I don’t really understand mathematics now. Everything faded.
Other than a brief digression into binary search, 70 pages of code can say there was none.
It came down to practical exercises. As a result, I look at the exercises and don’t understand how to solve these tasks at all, it makes sense to give such tasks at all if they are an order of magnitude more difficult than the chapter passed, in my case it’s completely off topic. The tasks mention - mathematical induction, logarithms, matrices, binomial distributions, recursion, etc.
In general, I do not understand how to independently understand these algorithms.
Maybe he chose the wrong book? or is there no basis for algorithms? At what stage of training is it generally worth taking on the study of algorithms and data structures? Well, you can still figure out the algorithm itself, the implementation of some simple sorts is clear to me, and binary search too, but how to learn how to solve algorithmic problems?
The very beginning of the book, and I already have a stupor, and then it gets more difficult ...
Answer the question
In order to leave comments, you need to log in
The author of the question intrigued me. And although I'm not doing Java, I downloaded the book, ran through the first chapter and assignments.
Well, yes, there are a couple of exercises with logarithms. If you open Wikipedia on the logarithm, then we will see that logarithms are calculated using simple series, where only arithmetic operations are used (I hope your knowledge of mathematics extends to these actions (+ - / *)?). Solving the problem based on this information is quite simple.
All other "smart words" are found in the "creative tasks" and "experiments" section - there are apparently somewhat more complex tasks. Although I'm not sure.
The word recursion, in the context of the book, has a direct relation to programming and little to mathematics. It means that the function calls itself. All tasks for recursion are about this. The chapter talks about it. Is it really that difficult? Apparently you did not understand the explanation in the chapter you read.
Other issues can be discussed as well. They are all pretty easy, some you need to spend time on, some are decided on the go. Tasks where there are "smart words" from mathematics usually do not directly concern this mathematics. Is that a creative task to write a library of matrix calculations, but even there it is proposed to write only 5 simple matrix operations. Open Wikipedia on the description of matrices and you will see that these operations are implemented quite simply.
Before writing plaintive posts on the toaster, spend at least 10 minutes thinking about the task and maybe a little Google. Also, you may need to re-read the chapter.
Well, in the end, if after thinking, re-reading and googling, you see that you can’t do without going deep into mathematics - you can just skip the task :-)
Do you want to learn something new without effort? It doesn't happen!
Or maybe it's not yours at all?
I recommend buying a 4-volume (already) "The Art of Programming" by Donald Knuth, just about algorithms. I recommend it in all seriousness, as a personal read!
Also, the same author "Concrete Mathematics", but he has not read it yet, lies, waits.
Alas, there is no smell of java. But then, when you figure out what is Java, what is not Java, everything is one :-)
Either you have a very bad imagination, or you misunderstood the chapter, or you know school mathematics very poorly, or the author lied to you that mathematics is not required.
Most likely the latter.
This is called professional deformation, and here it lies in the fact that the author thinks mathematics is simple and obvious, because he writes that mathematics is not particularly required.
Khan Academy has a simple introduction to algorithms. A minimum of mathematics, test tasks are immediately checked. A very simple course. Well, complex algorithms cannot be mastered without mathematics, there is no silver bullet here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question