Results 1 to 3 of 3
  1. #1
    starterkit123 is offline Member
    Join Date
    May 2013
    Rep Power

    Default Help with linkedlist sort() and reverse

    Modify the LinkedList1 presented in this chapter by adding
    sort() and reverse() methods.
    The reverse method reverses the order of the elements in the
    and the sort method rearranges the elements in the list so
    sorted in alphabetical order. Do not use recursion to
    either of these operations. Extend the graphical interface
    LinkedList1Demo class to support sort and reverse commands,
    it to test the new methods.

    (linkedlist1 source code:)

    /** The LinkedList1 class implements a Linked list. */ class LinkedList1 -

    (linked1 demo source code)
    import java.awt.*; import java.awt.event.*; import javax.swing.*; import java -

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power

    Default Re: Help with linkedlist sort() and reverse

    A lot of folk can't or won't follow links. The reasons vary from corporate firewalls to the laziness that programmer's prize for its productivity. But one reason stands out: this is a "help" site and nobody can really help without knowing where you're coming from. So you might do better to make the problem specific (pick one, eg the reverse one might be easier), have a go, and post your code.

    It really doesn't matter whether it wroks or not. But explain how you are going about the implementation, and what compiler messages or runtime exceptions etc you encounter.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: Help with linkedlist sort() and reverse

    Moving to New To Java.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. What does LinkedList.Node head = linkedList.head(); does?
    By Jack_Tauson_Sr in forum New To Java
    Replies: 1
    Last Post: 04-19-2013, 08:32 AM
  2. Replies: 10
    Last Post: 03-15-2012, 10:46 AM
  3. Replies: 11
    Last Post: 01-25-2012, 01:43 AM
  4. Using Merge Sort to sort an ArrayList of Strings
    By coldfire in forum New To Java
    Replies: 3
    Last Post: 03-13-2009, 01:03 AM
  5. How to sort a list using Bubble sort algorithm
    By Java Tip in forum Algorithms
    Replies: 3
    Last Post: 04-29-2008, 08:04 PM

Posting Permissions

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