Results 1 to 2 of 2
  1. #1
    Bmorebob is offline Member
    Join Date
    Mar 2011
    Manassas, VA
    Rep Power

    Default Binary Tree of Linked Lists

    I'm trying to write a database program but I need to include ADTs. Would it be possible/efficient to organize the records into a binary search tree with each node/record being a linked list?

  2. #2
    lovelesh is offline Senior Member
    Join Date
    Nov 2010
    Blog Entries
    Rep Power


    I don't know how difficult it would be:

    write a wrapper class around LinkedList and this class should implement Comparable.

    As you are implementing Comparable, you will have to write your compareTo method. You will need to write a comparison algo in this method, which should be able to compare two LinkedLists.

    Once you are able to do this, you can easily put this wrapper object in the binary tree.

Similar Threads

  1. concatenating linked lists
    By coder94 in forum New To Java
    Replies: 1
    Last Post: 02-28-2011, 07:16 AM
  2. Linked Lists
    By Dee in forum New To Java
    Replies: 18
    Last Post: 02-02-2011, 04:14 AM
  3. Concatenate Linked Lists
    By tttestall in forum New To Java
    Replies: 1
    Last Post: 04-20-2010, 08:03 PM
  4. Replies: 0
    Last Post: 04-04-2010, 08:40 AM
  5. Linked Lists
    By vendetta in forum New To Java
    Replies: 6
    Last Post: 01-26-2010, 09:23 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts