0% found this document useful (0 votes)
1 views

Assignment 2

Uploaded by

omkarmalap
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Assignment 2

Uploaded by

omkarmalap
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Algorithms and Data Structures Using Java

Assignment 2

Instructions:
 Write a Java program for each of the below question
 In your source code add header code containing your name as well as the
corresponding question text
 Submit the assignment in given time limit

1. Create a linked list of strings

2. Using the linked list of strings created in question 1., implement stack of strings

3. Implement circular queue of strings using linked list of strings created in question 1.

4. a) Create a class MyNumberList with following methods:


void append(int element);
void display();
void insert(int element, int position);
void remove(int position);
b) Write a method merge() in a MyNumberList, which merges a linked list passed as a
parameter with the list refered by this reference. The signature for the merge() is as given
below:
MyNumberList merge(MyNumberList list);

5. Write a method reverse() in a MyNumberList, which reverse the list, which id passed as
a parameter. The signature for the merge() is as given below:

MyNumberList reverse();

You might also like