(1)HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms?Quora
AskQuestion
AskorSearchQuora
DataStructures
Knowledge
Algorithms
Learning
HowtoQuestion
Read
+2
HowdoIstartlearningorstrengthenmyknowledgeof
datastructuresandalgorithms?
Answer
Request
Follow 4.5k
Comment Share 34
Downvote
PromotedbyHelpjuice
World'smostpowerfulknowledgebasesoftware.
Simple,powerful,instantsearch,enterpriseanalytics,noticketing.Trustedbyover3,000
companies.
LearnMoreatHelpjuice.com
100+Answers
HarshThakar,ComputerScienceGrad
WrittenJul31,2013
OriginallyAnswered:HowdoIlearnDataStructuresandAlgorithms?
Data Structures and Algorithms (DSA for short) is an implementation based course.
Many companies stress heavily on concepts from this course in their interviews. In
order to master this course, you need to be strong with both the theory and
Answer
Notifications
FRED
RelatedQuestions
ShouldIlearnalgorithmdesigntechniquesanddata
structuresbeforestartingpracticinginCodeChef?
Willtheknowledgeofalgorithmsanddatastructures
helpmewithdatamining?
HowshouldIstartlearningdataStructuresand
algorithms?Ihavesolvedaround80problemson
Codechef(Adhoc).HowdoIstartfrombasics?
Canyoulearnandmasteralgorithmsanddata
structureswithoutbeinggoodinmathematics?
IwanttolearndatastructureandAlgorithm,shouid
learningdatastructurefirstthenAlgorithmorstart
learningthematthesametime?(Th...
Whatarethebenefitsoflearningalgorithmsanddata
structuresinDataEngineering?
WhyshouldIlearndatastructuresandalgorithms?
Whichprojectscanbemadeusingtheknowledgeof
datastructuresandalgorithms?
HowcanIlearndatastructureandalgorithmstheory
withoutanypriorknowledgeinmathematics?
Isthereanyneedofpriorknowledgeofgraphtheory
beforestudyingdatastructuresandalgorithms?
MoreRelatedQuestions
read it while working with your course load. You can instead use this as a
reference book supplementing your recommended course book.
2. Implement the Data Structures you read about. While reading about them
might give you a fair idea of they work, it is dierent from actual
implementation where you will need to take care of boundary cases. There
will be cases where you forget null checks and mess up your entire code.
3. Understand complexity. You need to be able to calculate the space
QuestionStats
4,588Followers
1,250,267Views
LastAskedMon
131MergedQuestions
Edits
Additionally you can also check out MIT's video lectures on OCW or relevant courses
on Coursera
External Links
1. http://www.codechef.com/
2. https://www.hackerrank.com
3. http://www.topcoder.com/
4. http://www.spoj.com/
5. Introduction to Algorithms: Thomas H. Cormen, Charles E. Leiserson,
Ronald L. Rivest, Cliord Stein: 9780262033848: Amazon.com: Books
https://www.quora.com/HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms
1/7
1/12/2017
(1)HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms?Quora
6. Introduction to Algorithms
AskorSearchQuora
AskQuestion
Read
Answer
Notifications
FRED
92.4kViewsViewUpvotes
Upvote 214
Downvote Comments 2
RobertLove,SoftwareEngineeratGoogle.
WrittenJun29,2013FeaturedinForbesUpvotedbyKiranKannar,Onelove.
C++wasmyfirstprogramminglanguage.andNehaNarkhede,CofounderandCTO
atConfluent
OriginallyAnswered:HowdoIstrengthenmyknowledgeofdatastructuresandalgorithms?
I see it time and again in Google interviews or new-grad hires: The way data
structures and algorithmsamong the most important subjects in a proper computer
science curriculumare learnt is often insucient. That's not to say students read
the wrong books (see my recommendation below) or professors teach the wrong
material, but how students ultimately come to understand the subject is lacking.
The key to a solid foundation in data structures and algorithms is not an exhaustive
survey of every conceivable data structure and its subforms, with memorization of
each's Big-O value and amortized cost. Such knowledge is great and impressive if
you've got it, but you will rarely need it. For better or worse, your career will likely
never require you to implement a red-black tree node removal algorithm. But you
ought be ablewith complete ease!to identify when a binary search tree is a useful
solution to a problem, because you will often need that skill.
So stop trying to memorize everything. Instead, start with the basics and learn to do
two things:
Visualize the data structure. Intuitively understand what the data structure
looks like, what it feels like to use it, and how it is structured both in the
abstract and physically in your computer's memory. This is the single most
important thing you can do, and it is useful from the simplest queues and
stacks up through the most complicated self-balancing tree. Draw it,
visualize it in your head, whatever you need to do: Understand the structure
intuitively.
Learn when and how to use dierent data structures and their algorithms in
your own code. This is harder as a student, as the problem assignments you'll
work through just won't impart this knowledge. That's ne. Realize you won't
master data structures until you are working on a real-world problem and
discover that a hash is the solution to your performance woes. But even as a
student you should focus on learning not the minutia details but the
practicalities: When do you want a hash? When do you want a tree? When is a
min-heap the right solution?
One of the questions I ask in Google engineering interviews has a binary search tree
as a potential solution (among others). Good candidates can arrive at the binary
search tree as the right path in a few minutes, and then take 10-15 minutes working
through the rest of the problem and the other roadblocks I toss out. But occasionally I
get a candidate who intuitively understands trees and can visualize the problem I'm
presenting. They might stumble on the exact algorithmic complexity of some
operation, but they can respond to roadblocks without pause because they can
visualize the tree. They get it.
As for a book, there is but one: Introduction to Algorithms
by Cormen, Leiserson,
or Algorithms in Java , as
appropriate. I prefer CLRS as a text, but you might nd these a better teaching aid.
332.9kViewsViewUpvotesAnswerrequestedby1person
https://www.quora.com/HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms
2/7
1/12/2017
(1)HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms?Quora
Upvote 3.6k
AskorSearchQuora
AskQuestion
Read
Answer
Notifications
FRED
YoshiyaMiyata,Lovesolvingalgorithmicproblems
WrittenAug15,2012
OriginallyAnswered:HowdoIlearnDataStructuresandAlgorithms?
There are lot of great books, online resources, and online courses that teaches you
basics of algorithms and data structures. I will list them below:
Books:
Introduction to Algorithm
Commonly known as CLRS, taking the rst letter from each of the co-writers of the
book. One of the most comprehensive algorithm book out there. It has over 1000
pages of content, covering wide range of topics.
http://www.amazon.com/Introducti...
Algorithm Design
Written by John Kleinberg and Eva Tardos. Another great algorithm book. It covers
everything that the beginner in algorithm has to learn. Compared to CLRS, this book
is more focused on teaching the essentials where else CLRS has more broader scope.
http://www.amazon.com/Algorithm-...
Algorithm Design Manual
Written by Steven Skiena. This book has a very unique style. Second half of the book
contains a huge catalog of algorithms, which serves as a great reference when solving
algorithmic problems. Book covers key algorithmic concepts. Some of the algorithm's
implementation is given in C code. Compared to previous two books it is much
shorter in length.
http://www.amazon.com/Algorithm-...
Online Courses:
MIT 6.046J Introduction to Algorithm
Introductory level algorithm class for undergraduates at MIT. CLRS is used as
textbook for this class.
http://ocw.mit.edu/courses/elect...
MIT 6.851 Advanced Data Structures
This is a graduate level class and it is very academic, so it is not for beginners, but it is
a great resource if you want to learn more advanced data structures concept.
http://courses.csail.mit.edu/6.8...
Online Resources:
TopCoder Algorithm Tutorial
This set of great algorithm tutorials were written by various TopCoder competitors.
Some of them covers very basic algorithmic concepts, while others cover very minor
but useful concepts not covered on any of the other resources.
http://community.topcoder.com/tc...
These are all very generic resources that teaches basics of algorithm. If you are
https://www.quora.com/HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms
3/7
1/12/2017
(1)HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms?Quora
looking for more specic eld of algorithm then it is often helpful to look for
AskQuestion
AskorSearchQuora
academic papers dealing with the topic.
Read
Answer
Notifications
FRED
69kViewsViewUpvotes
Upvote 139
Downvote Comment
JoshuaPan,GloballeaderonCodeFights,USACOPlatinumcompetitor,
CodeForcer
WrittenMar21,2016
OriginallyAnswered:HowcanIlearndatastructuresandalgorithmswell?
Data structures and algorithms are hard to learn. Here's a huge list to show how much
there actually is out there: Data Structures and Algorithms .
So how do you improve on this?
Mastering these things require two things: understanding and implementation.
Here are some steps to follow.
#1 Read about the data structures/algorithms. I have given you a good list of things
to study, but this won't get it entirely. Here is another link to nd lists of algorithms:
What are the algorithms required to solve all problems (using C++) in any competitive
coding contest?
Obviously, this does not cover everything. Reading CLRS algorithm book will
also be really nice.
Algorithms Books: If CLRS is considered as quite hard book for
beginners, what another great book would you recommend for
beginners?
You will see that reading about algorithms and data structures is kind of like
supply and demand. The more problems you do, the more algorithms
you've got to study up on.
Don't need to implement right away. Make sure to understand the details of
the data structures/algorithm, so that if there is a little twist in a problem,
you'll be able to pick it up immediately and know where to change your code
in your data structure or algorithm. I would recommend writing out the steps
on a piece of paper and being the computer and doing each step of the
algorithm or each part of the data structure by hand.
#2 Practice, practice, practice. This should be simultaneously done with #1. Never
just do #1 or #2; this will not help you. You need to implement AND learn how the
algorithm works, so that you are able to tweak it however you want.
There are so many online coding platforms: What are the various online
programming contests?
Here are the ones I would say to focus on:
CodeForces
https://www.quora.com/HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms
4/7
1/12/2017
(1)HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms?Quora
#3 Implement. Get a working code ready and debug if necessary. You should be able
AskQuestion
AskorSearchQuora
to look at your piece of paper and code up the data structure/algorithm pretty simply.
Read
Answer
Notifications
FRED
If you get stuck, you might have either misunderstood the algorithm/data structure
(Go back to step 1) or consult a pseudocode (either on Codechef or HackerEarth Code
Monk or TopCoder tutorials or etc.).
Some tutorials on data structures which you can learn from.
Data Science Tutorials
(pseudo-code)
(above link)
or Notes on HackerEarth
(in
Downvote Comment
KunalSuri,Awannabeprogrammer.
UpdatedFeb13,2015
OriginallyAnswered:HowdoIlearnDataStructuresandAlgorithms?
https://www.quora.com/HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms
5/7
1/12/2017
(1)HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms?Quora
WARNING:- This answer might seem be long but contains my experiences with this
AskQuestion
AskorSearchQuora
fundamental eld.
Read
Answer
Notifications
FRED
. This is a book
written for people like you and me who want to enter into this beautiful eld but lack
the weapons in the arsenal to make it past the gates of this mansion. Also, this book is
written without emphasizing any language and hence follows a pseudocode approach which is very important as it works as a detox to the whole "languageoriented" thinking which makes it dicult to think about complex problems because
you are too focused on the programming language that you forget to look at the
problem.
However, if you are not very strong in programming and need a book that teaches
algorithms by implementing them in a programming language, I would seriously
recommend Sams Teach Yourself Data Structures and Algorithms in 24 Hours: Robert
Lafore: 978067231633g3: Amazon.com: Books
very lucid explanation. Having read it myself, I can vouch for the eectiveness of this
book. Don't try to nish o this book in 24 hours. Take your time to read it. Read it
thoroughly. It won't take you far but will make your basics in DS/Algo as well as C++
very strong. If you read this book, I don't think that you'll need the book I mentioned
above. After reading this book, go for CLRS. You will have the treat of your life. If you
are Java person, then studying Amazon.com: Bundle of Algorithms in Java, Third
Edition, Parts 1-5: Fundamentals, Data Structures, Sorting, Searching, and Graph
Algorithms (3rd Edition) (Pts. 1-5) (0785342775785): Robert Sedgewick: Books
will
make your base very strong. However, it takes a rigorous route and teaches you many
algorithms. For learning these topics in C, take a look at Algorithms in C, Parts 1-5
(Bundle): Fundamentals, Data Structures, Sorting, Searching, and Graph Algorithms
(3rd Edition): Robert Sedgewick: 0785342756081: Amazon.com: Books . I haven't
studied this series but since the writer is the same, so the pedagogy should be similar.
Also, algorithms are always the same. It is the implementation that changes,so don't
panic if you nd one algorithm written in two dierent languages and you are unable
to understand one or the other.
91.9kViewsViewUpvotes
Upvote 359
Downvote Comments 8
AbhimanyuMongandhAmbalath,MastersinCSatIITKanpur
WrittenMay19,2013
OriginallyAnswered:Whicharesomeofthemusthavebooksforalgorithmsanddatastructures?
https://www.quora.com/HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms
6/7
1/12/2017
(1)HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms?Quora
AskQuestion
Read
Answer
Notifications
FRED
Algorithms
1) Algorithm Design 1st Edition by
One of the
best books for Algorithms and takes a good eort in making you understand the
intution behind the Algorithm, which I have found to like a lot.
2) The Algorithm Design Manual by
Steven S. Skiena
Kleinberg, this book will introduce you to a wide range of problems, this book is a
example by example book, and hence may need basic level knowledge.
Graph Theory
I specialized in that, and hence even though you may not need them, suggesting the
following.
1) Introduction to Graph Theory 2nd Edition by Douglas B West.
- This is my
favorite book, and has almost everything on Graph theory, but lacks a intutional idea.
2) Graph Theory 01 Edition by Harary -
Reinhard Diestel -
Graph theory, and does a good job at that, but personally I like the above two books
for dierent reasons better.
References
1) Introduction to Algorithms 3 Edition -
when I need to know stu, the algorithms and data structures, are presented as is,
without any amount of intuition or anything. But if you have a technical doubt in
algorithms, chances are that this book will answer it. So please do use this as a
reference book. Chances are you will nd better text books for each of the topics in
CLRS.
18.9kViewsViewUpvotes
Upvote 71
Downvote Comment
TopStoriesfromYourFeed
PopularonQuora
PopularonQuora
PopularonQuora
Whatarethemostcommonlies
toldbyprogrammers?
Whatisthecreepiestthingyour
parenthaseverdone?
Ifhumansareshottodeathforthe
next100,000years,wouldthey
evolvetohavebulletproofskin?
GeoffreyBans,7+yearsprogramming
mywaytosuccess
NatalieMcGuire,Toomuchlife
experience
UpdatedMon
UpdatedSun
AntonyPateman,Fulltimefather
UpdatedJan6
My girlfriend calls:
...
ReadInFeed
ReadInFeed
https://www.quora.com/HowdoIstartlearningorstrengthenmyknowledgeofdatastructuresandalgorithms
ReadInFeed
7/7