program using linked lists and recurison

R

rain2222

ok so i am completely new to java and i don't even know where to
begin.....any help would be greatly appreciated!!

Given a sequence of numbers, write a class named my_Special_Order to store
them in a linked list and then print them on the screen by starting from
the middle, printing each number going left until beginning is reached,
then starting from the middle and then printing each number (excluding the
middle) going right until end is reached. For example, given “103 23 4 13
21 18 19” as input, your program should print out “13 4 23 103 21 18 19”.
Hint: Using the LinkedList Class, the new class should contain at least
two methods: one for setting the sequence and pointers to beginning,
middle and end, and one for printing the interior of the sequence in the
required order.
2. (50 points) Write a java class named my_Reverse using recursion. It
takes a string of letters or digits of length at most 100 and prints it in
reverse order. For example, given “welcome 2005” as input, your program
should print out “5002 emoclew”. Note that space is the only separator
between words.
Sample Run:
Problem 1:
Enter numbers:
1 2 3 4 53
The desired sequence:
3 2 1 4 53
Problem 2:
Enter string:
welcome 2005
Reverse string:
5002 emoclew
 
M

Monique Y. Mudama

ok so i am completely new to java and i don't even know where to
begin.....any help would be greatly appreciated!!

Have you tried talking to your instructor about it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top