Answer the question
In order to leave comments, you need to log in
Do you know standard structures and algorithms?
Hello toaster community!
Actually, subject! In many vacancies, smart (I hope so) people write that the applicant must know standard algorithms and data structures. Here I have a question: Do you know the standard data structures and algorithms?
Do you use it in your work? When was the last time you wrote a sort yourself? At least a bubble :)
And some algorithm?
What do you write on?
Answer the question
In order to leave comments, you need to log in
only those who do not know what it is will not write a bubble. Well, yes, you need to know approximately how they work and the complexity of various algorithms for various cases in order to write more efficient code.
In general, everything rests on the knowledge of the complexity of the algorithms, it follows from this that you should know at least approximately how these algorithms work. Let's say you should know that in such and such a case that your program encounters more often, algorithm A has complexity O (N) and the other in the same case is only O (log N) .... despite the fact that in most other problems the same algorithm A with certain assumptions can have complexity O(1).
Basic algorithms are usually associated with data structures (insertion/selection from a hash table, insertion/selection into trees, etc.) Using sorting algorithms, it’s just more convenient to explain the whole thing and teach people to develop algorithms, determine their complexity, etc.
Now I'm going to re-read Kromen, "Algorithms: Construction and Analysis". For I caught myself thinking that I already remember the whole thing badly.
Let's say I know.
Here the chip is different - not only do you need to know the algorithms, you also need to apply them. That is, it does not matter the number of smart books that you have read. It is important how often you use them and look at other solutions - experience of use.
It sounds a little crazy, but you need to achieve an understanding of the need to use this or that algorithm on an intuitive level, to understand all its nuances. And this is achieved only by working on various tasks.
> Do you know standard data structures and algorithms?
No, I don't know standard structures and algorithms, because:
1. There is no such standard
2. Each person has his own standards.
Therefore:
1. I know the elementary.
2. If you need something hackneyed (and this is rarely needed), then you have to go to Google.
It is impossible to know everything, and it is not necessary. It is better to know where you can find the information you need .
I do not know any standard structures and algorithms, and I do not think that I should know them. It is important for a programmer to be able to analyze, look for solutions, use their own experience and the experience of colleagues, and choose the best option based on the above.
I write in C# for the Web.
I know some standard structures and algorithms. But I rarely use it in my work: usually situations arise such that the direct application of the standard algorithm will not be very effective (or for some reason will not work at all), so you have to build more special structures and algorithms - usually as a combination of standard techniques, but not necessarily.
Of the standard ones, I had to write, perhaps, a priority queue: for some reason, they didn’t do it in C #. And the QR-algorithm for the matrix eigenvalues (I'm not talking about little things like the multidimensional Newton method - they come across regularly, and each time with their own characteristics).
Sorting was last written about six months ago. It turned out to be a monster for half a thousand lines, but it worked.
Bubble sort (or simple inserts) has to be written when for some reason it is inconvenient to call the standard Sort. For example, when sorting an array fragment with a non-standard comparison function - again, this method was not deduced in C#. It's easier to write three lines of code there than to design a comparator class.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question