Skip to content

Momen-Mustafa/Class-assignments-Algorithms-and-data-structure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

The requirements for the first assignment:

  1. Create a class in Java to manage an array storing a set of integer numbers (negative and positive). The class must offer three functions: append(int value), deleteBeginning(int value) and get(int index). The array size should be set to at least 100 elements.

  2. Use the class created in Step 1 to insert a sample data. Your data can contain any numbers, preferably a mix of positive numbers and negative ones.

  3. Convert the array created into Doubly Linked List. Then, create the time complexity model and write the Big Oh for this operation.

  4. Go through the doubly linked list created in Step 3 and find the smallest number. Again, create the time complexity model and write the Big Oh for this operation.

  5. Go through the doubly linked list and delete the second largest number. Similar to the previous two steps, create the time complexity model and write the Big Oh for this operation.

The requirements for the second assignment:

1- Create a java application to ask the user to enter a set of words.

2- Save the provided words in a doubly linked list.

3- Sort the data in the linked list using Merge sort. The data should be sorted by the first character in ascending order.

For example, if the linked list contains the words: 'Cat', 'Book' and 'Copy'. Then possible sorts will be A) 'Book', 'Cat' and 'Copy'; B) 'Book', 'Copy' and 'Cat'.

4-Your sort method should not care whether the letters are in capital or not.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages