GeekInterview.com
Series: Subject: Topic:
Question: 120 of 1118

how to create a singly linked list without using in-built functions?

Write a program in Java that reads a text file, "in.txt", that contains a list of integers separated by spaces. After reading the integers, the program stores them into a singly linked list and prints out the smallest integer in the list using the following recursive algorithm:
1. Divide the list into two halves(if the list contains odd number of elements the halves will be of approximately the same length).
2. Find the smallest integer in each of the two halves recursively.
3. The smallest integer in the entire list will be the smaller of these two integers.
Asked by: Interview Candidate | Asked on: Mar 23rd, 2007

This Question is not yet answered!

Related Open Questions

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.