Whats the importance of data structures and algorithms for programming? [closed] - algorithm

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Possible Duplicate:
Why should I learn algorithms?
Hello, I'm a curious beginner and I don't understand how algorithms and data structures are useful in programming. Are they crucial for being a good programmer? Why should I learn them and how they actually help me when writing code?
Thanks so much!

They help you write efficient code and solve problems in optimal or near-optimal ways. Without them, you will be reinventing the wheel - not always successfully.
Also, they help you structure your code, so that it can be maintained more easily by encouraging a better design / implementation.

Algorithms and data structures are the basic tools of a programmer. They are as essential as a hammer (or nail gun) to a house framer. They are the tools that solve problems so you don't have to reinvent the solution.
You should understand what they are, why and how they work, and what their shortcomings are. Knowing this will save you a huge amount of time that could be wasted trying to solve a problem that has a solution.

You can get by programming without being proficient in a particular language, but you cannot program without the knowledge of data structures. Data structures are more of a Computer Science obsession. Each problem will have its own ideal data structure that fits naturally to it and to manipualte the data in the structure you will need algorithms.

Related

optimal sequence to be followed for studying topics like dp [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am a novice to algorithms and data structures. I recently started participating on codeforces and spoj etc.for solving questions i need to study dp,greedy algorithms,graph algorithms,data structures.what should be my strategy for studying or rather sequence and what data structures i need to know for competitive programming?
All in all there shouldnt be an "optimal" sequence. Its all about understanding the topic. Since not two people can learn with the same speed, there shouldnt be something like an "optimal" sequence. But its good to learn basic approaches of each topic.
There are alot Tutorials out there, which explains the most fundamental thing in any topic. E.g. Youtube covers most graph problems. Even DP and so can be found there. Especially on Topcoder Tutorials there is alot you can learn.
On the other hand you will learn nearly nothing, if u dont have to think for yourself. So solving such puzzles is a must. I would recommend this site (especially for dp). Just check the "problem set" link on the site and look for dynamic programming.
I recommend you this book: Competitive Progamming, by Halim. Is very complete, and newbie-compatible.

Advanced Rudimentary Computing? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Lets say that my definition of 'rudimentary programming' refers to the fundamental tools employed for a computer to perform a task.
Considering programming rudiments, the learning spectrum usually looks something like this:
Variables, data types and variable memory
Arrays/Lists and their manipulation
Looping and conditionals
Functions
Classes
Multi threading/processing
Streams (hard-disk and web)
My question is, have I missed any of the major rudiments? Is there a 'next' to the spectrum that still eludes me?
I think you missed the most important one: algorithms. Understanding the complexity, know the situation to use them, why use them and more important, how to implement them.
I'm pretty sure that you already know a lot about algorithms but if you think that your tool-knowledge (aka the programming languages) are good enough, you should start focus, more, on the algorithms.
A great book to start is: Introduction to Algorithms, from Thomas H. Cormen

How can I come up with creating an algorithm which simulates a real time situation [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm good at algorithms but not as good as converting real-time problems and learning them throughly to make it as an algorithm. I would like to know if there is any book/paper that teaches or makes you demystify the situation and formulate it as an algorithm. (Its much like training your mental ability to break the situation and comeup with algorithm in a crisp.)
Showing some of the ways to approach these kinda problems. and any easy learning links/material would help me a lot.
Note: I know SO doesnt allow to ask for the opinion or something vague (I dont mind my Q being downgraded). But I am asking some concrete problem and hope can get some nice info from some of the great minds here.
The word that fits better as a direct answer is "experience". There exists no magical formula to convert a real time problem into some algorithms that solve it. As an analogy, there exist no predefined patterns on how to solve a mathematical problem. It is a mind's task to express the solution, based on some fundamental knowledge and on experience that is accumulated though constant learning.

Algorithm vs Code [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I came across the declaration in a software best practices guide that algorithm and code shouldn't get mixed up. I'm not sure what is meant by this? As far as I understand, code is the implementation of the algorithm, isn't is? So, what exactly is meant by this statement? and why it is considered as a good practice?
Thank You!
The context in which the author mentioned would be clearer if you had pasted the surrounding lines.
Though what it would mean to me is, an algorithm is just a clear step-by-step logic that you would use to implement. You would leave out the finer implementation details like selection of the right data structure and other implementation details while you write/design the algorithm.
A good explanation can be found here
An algorithm is a series of steps for solving a problem, completing a task or performing a calculation. Algorithms are usually executed by computer programs but the term can also apply to steps in domains such as mathematics for human problem solving.
Code is a series of steps that machines can execute. In many cases, code is composed in a high level language that is then automatically translated into instructions that machines understand.

Algorithms question/problem lists [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
This may not be question of programming and people are open to close.
Does anyone has list of questions/problems to solve which helps to improve algorithms skills
may be for interview purpose.
A good option is Project Euler.
In its own description:
Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.
The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.
This seems like a perfect match...
Try TopCoder. They have held hundreds of algorithm competitions. Their archive contains thousands of problems for practice, including editorials describing the solutions. You can also view other people's submitted source code for the problems.
This will certainly sharpen your algorithm and problem solving skills, which should make you better prepared for algorithmic interview questions.
Fizz-Buzz?

Resources