5 Replies - 2759 Views - Last Post: 12 July 2010 - 09:37 PM Rate Topic: -----

#1 dumiya2010  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 11-July 10

Data Structures and Sorting Resources?

Posted 11 July 2010 - 11:30 PM

hi!
im duminda. and new for java development. so anyone can help me that i wanna know what is the easiest way to learn sorting and searching algorithms & data structures in java. appreciate any tutorial materials on this.
thanks,

duminda.

:helpsmilie:
Is This A Good Question/Topic? 0
  • +

Replies To: Data Structures and Sorting Resources?

#2 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2871
  • View blog
  • Posts: 11,026
  • Joined: 15-July 08

Re: Data Structures and Sorting Resources?

Posted 11 July 2010 - 11:38 PM

Hello!

What you are talking about is actually rather difficult. I am assuming that you know basic Java. If you don't I'd learn that first. However, I actually suggest google.com, wikipedia (yes, it's really good), and books. If you can get a class for it, then all the better.

Here's a relatively good place I just googled for: http://www.cogs.susx...html/notes.html

Again, for sorts and such, I'd recommend
http://www.wikipedia.com/
Was This Post Helpful? 0
  • +
  • -

#3 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10467
  • View blog
  • Posts: 38,794
  • Joined: 27-December 08

Re: Data Structures and Sorting Resources?

Posted 12 July 2010 - 12:05 AM

We are actually working on putting together a Data Structures resource thread for Java. If you want, you might find some of my tutorials helpful, as I've covered a few data structures and sorting algorithms. Including:

Insertion Sort
Selection Sort
Bubblesort
Graphs
Linked Lists

KYA's and Martyr2's blogs are also excellent resources for data structures, though they are more C++ specific.
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8328
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Data Structures and Sorting Resources?

Posted 12 July 2010 - 03:52 PM

If you think at a Data Structure (like a struct in C/C++ or a record in Fortran or a Level01 in Cobol) Java does not have these ways of agregating data.

If you want to sort an array of C/C++ struct you will have to define a class that contains the elements of the struct. Then your class has to implemnt the Comparable interface which means that it has a comparteTo() method that compare to instances of that class and retunrn an int saying if the two Objects are equal.

Multiple methods are available to sort an array of objects implementing Comparable.
Was This Post Helpful? 0
  • +
  • -

#5 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10467
  • View blog
  • Posts: 38,794
  • Joined: 27-December 08

Re: Data Structures and Sorting Resources?

Posted 12 July 2010 - 03:57 PM

I think the OP is referring to a more computer science-related topic, like Linked Lists, Graphs, Maps, Sets, Trees, etc. More like a Data Structures class in college. :)
Was This Post Helpful? 0
  • +
  • -

#6 YasuoDancez  Icon User is offline

  • D.I.C Head

Reputation: 20
  • View blog
  • Posts: 135
  • Joined: 30-September 09

Re: Data Structures and Sorting Resources?

Posted 12 July 2010 - 09:37 PM

Yes it sounds like to what macosxnerd101 said.
Check out the college lecture courses from berkley...
CS61B Data Structures
I love these lectures. Teaches you a whole semester worth of subjects from Linked List to advance trees later on.

Also check out a book called Data Structures and Algorithm in Java by Peter Drake. I love how he uses games as examples through out the book and there are tons of exercises.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1