• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Learning Data structures

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to learn the data structures concepts and learn which data structure should be used for what purpose. e.g where to use HashMap or Treemap or ArrayList.
I want to know if there is any good book from which I can learn this.
I have book ""data structures and algorithms in java" by Robert Lafore. Is this book good enough.
Essentially after reading this book would I be able to answer below questions:
1. Given a data requirement which Java data structure to use
2. Reasons for choosing a data structure

I am looking for a book which can teach concepts and is simple enough to understand.
I want to know if there are any recommendations.

Thanks,
Satish
 
Ranch Hand
Posts: 334
2
Netbeans IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satish,

I haven't read that version but "Data Structures and Algorithms" with the same general outline has been around for a long time. I had a text book with that title for an undergrad course in the early 70's, and found it very helpful one of the few books from that era that I still keep around.

I was surprised but it looks like one can download the whole book in pdf form from http://uwu.weebly.com/uploads/4/0/6/3/4063810/data_structures_and_algorithms_in_java.pdf so others can see for themselves.

I see it as a good foundation to teach the concepts of the structure themselves, what they are, how to use them and how to implement them. I'm not sure how well it covers when it is appropriate to use which structure.

Your questions :
1. Given a data requirement which Java data structure to use
2. Reasons for choosing a data structure

are pretty good but I tend to see them as judgment calls more than training issues. For example the decision between a HashMap and TreeMap is usually irrelevant. Only when the maps get pretty big and are used quite a bit does the efficiency make a difference and then which one is better depends on the characteristics of the data and how you're going to access it.

Sorry for the rambling but it's an interesting topic for me and I don't have a yes or no answer to your question.

My recommendation is to try to read the book. Skip around and see what they are presenting, if it's interesting read it. The information is very good but it's not a how-to guide and it may not address the questions at the level you're looking for.

Joe
 
Ranch Hand
Posts: 207
jQuery Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, have a look on the Collections tutorial on Oracle's site http://download.oracle.com/javase/tutorial/collections/index.html

It will answer all your questions about when to use what.
 
Pankaj Kumarkk
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the responses.
Based on the responses, I have decided to do below.
Go through "data_structures_and_algorithms_in_java by robert lafore" and then go through the "http://download.oracle.com/javase/tutorial/collections/index.html" and collections chapters in the book "Java Generics and Collections" by By Maurice Naftalin, Philip Wadler.
Will keep the group posted on my experiences.
Thanks,
Satish
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Strong understanding of Data Structure and Algorithms are good enough and never mind the books you are going to learn of. Scrap from basics. Recently I attended an interview for Amazon, and they do look only for folks they were good enough in data structure. I do like to share the questions we were asked to write the program

1) Given a number and you have to find the maximum than the given number by traversing through the Binary Search Tree. Also we were asked to write the time complexity of the Algorithm implemented

2) Write a program for thread free queue

3) Adding two singly linked list, the result should be populated in the resultant linked list.

Unless you know the basics and have a strong programming skills you could not answer any of the question. So practice learning by coding. Almost 20 members attended the interview and none cleared their selection process.

Regards,
Mick
 
You didn't tell me he was so big. Unlike this tiny ad:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!