My question: How important is it to learn and understand sorting algorithms and routines?

5
Contributors
6
Replies
8
Views
12 Years
Discussion Span
Last Post by Narue

it is important when you need to use them... sometimes when you want to do something (like some type of sorting) you can't always find the libraries, so you need write them... at that time you will need them...

>How important is it to learn and understand sorting algorithms and routines?
It's very important. Even if you always use libraries (which is somewhat silly since libraries are designed to be generic and you may need something specific), sorting algorithms cover a huge number of techniques and concepts for designing, implementing, and analyzing algorithms in general. So if you know about sorting, you'll have an easier time with other (seemingly unrelated) algorithms, and even data structures.

Generally speaking, the more you learn about and think about algorithms (of any kind), the better programmer/problem solver you become. Sorting algorithms are one prevalent example, but in general, it's always a good idea to learn how things work. That way you'll end up thinking, "I need this done, and I can write function X to do it," instead of, "Where can I find function X to do this for me?" (Not that code reuse is bad, just that if I ever see another PHP coder (just to stereotype) ask, "How do I find if a given string is in an array?" I'm going to have to reconsider suicide for the 3rd time.)

Thank for the replies. That was actually exactly what I'm looking for. I have trouble thinking through the logical "non-sense" problems that are almost always at coding competitions. I was trying to think of a way to improve the way I look at problems and alogorithms in general, and the replies I got helped me out.

Thanks.

Hi everyone,

Is important to learn them by heart. I always jot down mathematical sorting formulas and practice them on pencil and paper and then convert them into programming. Yes some people say i have a stupid way of doing things but guess what it helps me and think that its good because it builds on my math and programming skills.

For example i was talking to my colleague(he does the hiring) and once he asked a C++ programmer how does he calcualte this.

``Log base2 5``

The programmer did not know how to do it but said he only knew base 10. The best part was he was from a very highly reputable college in the US

Basically to sums everthing up its important

Richard West

****************************************************************

>Is important to learn them by heart.
That's stupid, and a waste of your brain. It's important to understand them. Beyond that, there's plenty of reference material so that you don't need to spend time memorizing things that can be looked up. Learning the algorithms by heart can come out of understanding them if you use them fairly regularly, but memorizing for the sake of seeming intelligent is dumb.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.