Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Recursive function based on Linked list

  1. #1
    Junior Member
    Join Date
    Sep 2008
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Recursive function based on Linked list

    Hi I have a problem. I have to create a 'recursive loop' to search each node in a single linked list for the smallest value and return the node before that node.
    I was hoping to solve this problem by using the previous and current nodes.

    Now my problem is if the value appears in the middle of the list, then how can I still come back to the prev node of the smallest value after searching the whole list.


  2. #2

    Default Re: Linked list

    Can you write some of your code please?

    Have you tried with elementAt method and handle with integers?
    Last edited by leandro; March 9th, 2009 at 07:30 PM.

Similar Threads

  1. Java program which can list all files in a given directory
    By JavaPF in forum Java Programming Tutorials
    Replies: 8
    Last Post: July 9th, 2013, 03:38 AM
  2. Which collection is best to do mathematical operation on it?
    By Sterzerkmode in forum Java Theory & Questions
    Replies: 1
    Last Post: May 7th, 2009, 04:48 AM
  3. ClassCastException in Double Linked List toString
    By Rastabot in forum Collections and Generics
    Replies: 2
    Last Post: April 24th, 2009, 11:48 AM
  4. String substring, concatenation operation on linked list
    By oaks12 in forum Collections and Generics
    Replies: 1
    Last Post: January 15th, 2009, 07:12 AM
  5. Retrieving BFS code's adjacency list
    By moose4204l in forum Collections and Generics
    Replies: 0
    Last Post: October 20th, 2008, 06:30 PM