CCCS 315: Data Structures and Algorithms Assignment 1 Type of Assignment Individual Work Estimated Time: 120...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
CCCS 315: Data Structures and Algorithms Assignment 1 Type of Assignment Individual Work Estimated Time: 120 minute Description In this Assignment, you will study, Analyze (Big-O), and implement a singly Linked List Arrays. You also compare an implementation of a method using recursive programming vs iterative programming. Learning Outcomes +Evaluation Points 10 40 Recognize the use of the linked-list and recursive programming Apply Big-O notation to analysis of an algorithm 15 4 69 Code formatting Part 1 Java implementation of a Linked List Part 2 Big-O Analysis Questions Part 3 Comparison of recursive vs iterative solution Total U Part 1: Java implementation of a Linked List For this part, you will be provided a set of skeleton classes for you to implement a singly linked list of type int. You will also be provided a minimal set of test cases. You are encouraged to augment the test suite. Import the eclipse project Assignment1.zip into your workspace. The package includes a complete Node class as well as a test suite MyLinked List Test. A skeleton MyLinked List class is provided with the following methods that need to be implemented: Points 1 2 3 3 Method public MyLinkedList() public void add(int data) constructor public void add(int[] data) public void add(MyLinkedList 12) 2 2 2 2 2 2 1 5 10 1 2 public int get(int index) public void remove(int data) public boolean contains (int needle) public static boolean equals (MyLinkedList 11, MyLinkedList 12) public boolean equals(MyLinkedList 12) public boolean equals(Object 02) public boolean isEmpty() public int findMinIterative() public int findMinRecursive() public int size() public String toString() Total 40 Note that each of the above method are thoroughly commented in the included assignment1 package and that additional methods may be required. Additionally, you may assume that methods are provided valid input. To submit this part of the assignment, you are required to export your project as an Archive ZIP file and compress it using the ZIP format for upload in MyCourses. See instructions posted on MyCourses for importing and exporting Eclipse Projects. Part 2: Big-O Analysis Please indicate the Big-O time-complexity of each method in your Linked List implementation in the comments of each method. One point for each method. Part 3: Comparison of recursive vs iterative solution In the comment header of the Linked List class, answer the following questions: . [2 points] Which findMin implementation is faster and why? [2 points] Which findMin implemtation has less lines of code and why? CCCS 315: Data Structures and Algorithms Assignment 1 Type of Assignment Individual Work Estimated Time: 120 minute Description In this Assignment, you will study, Analyze (Big-O), and implement a singly Linked List Arrays. You also compare an implementation of a method using recursive programming vs iterative programming. Learning Outcomes +Evaluation Points 10 40 Recognize the use of the linked-list and recursive programming Apply Big-O notation to analysis of an algorithm 15 4 69 Code formatting Part 1 Java implementation of a Linked List Part 2 Big-O Analysis Questions Part 3 Comparison of recursive vs iterative solution Total U Part 1: Java implementation of a Linked List For this part, you will be provided a set of skeleton classes for you to implement a singly linked list of type int. You will also be provided a minimal set of test cases. You are encouraged to augment the test suite. Import the eclipse project Assignment1.zip into your workspace. The package includes a complete Node class as well as a test suite MyLinked List Test. A skeleton MyLinked List class is provided with the following methods that need to be implemented: Points 1 2 3 3 Method public MyLinkedList() public void add(int data) constructor public void add(int[] data) public void add(MyLinkedList 12) 2 2 2 2 2 2 1 5 10 1 2 public int get(int index) public void remove(int data) public boolean contains (int needle) public static boolean equals (MyLinkedList 11, MyLinkedList 12) public boolean equals(MyLinkedList 12) public boolean equals(Object 02) public boolean isEmpty() public int findMinIterative() public int findMinRecursive() public int size() public String toString() Total 40 Note that each of the above method are thoroughly commented in the included assignment1 package and that additional methods may be required. Additionally, you may assume that methods are provided valid input. To submit this part of the assignment, you are required to export your project as an Archive ZIP file and compress it using the ZIP format for upload in MyCourses. See instructions posted on MyCourses for importing and exporting Eclipse Projects. Part 2: Big-O Analysis Please indicate the Big-O time-complexity of each method in your Linked List implementation in the comments of each method. One point for each method. Part 3: Comparison of recursive vs iterative solution In the comment header of the Linked List class, answer the following questions: . [2 points] Which findMin implementation is faster and why? [2 points] Which findMin implemtation has less lines of code and why?
Expert Answer:
Related Book For
Posted Date:
Students also viewed these algorithms questions
-
Under certain rare circumstances, a nucleus can decay by emitting a particle more massive than an alpha particle. Consider the decays 223Ra ?? 209Pb + 14C and 223Ra ?? 219Rn + 4He. Calculate the Q...
-
Assume that investment spending depends only on the interest rate and no longer depends on output. Given this information, a decrease in money supply: a. will cause investment to increase. b. may...
-
FS Partners is a general partnership whose partners are Jerry Stahlman, a professional engineer, and Fitz & Smith, Inc., a corporation in the business of excavating and paving. Timothy Smith signed...
-
Pan Asia Airlines was founded in 1980. Headquartered in Hong Kong, the publicly traded company has routes throughout Asia and to major airports throughout Europe and North America. While Pan Asia...
-
Indicate the effect (increase, decrease, or none) on sample size of the following change, assuming other factors are held constant: (a) increase reliability, (b) decrease upper precision limit, and...
-
Identify where the cash flow effect of each of the following transactions is reported in the statement of cash flows: operating, investing, or financing section. State the direction of each change....
-
At what temperature would one mole of molecular oxygen (o2) have 5.0 x 10 3 J of translational kinetic energy? Note: The atomic mass of O is 16 u. Show work.
-
Prepare a purchases return (journal) book from the following transactions for April 2017. 2017 April 05 10 17 28 Returned goods to M/s Kartik Traders Goods returned to Sahil Pvt. Ltd. Goods returned...
-
Briefly explain how much time a victim of unlawful discrimination (let us say under Title VII) has to file an administrative complaint with the EEOC. Be sure to explain if the length of the period...
-
Which current asset is typically the least liquid?
-
Describe two reasons why managers might focus on quarterly earnings.
-
Identify two ratios to use to analyze a firms liquidity position, and write out their equations.
-
Indicate whether each of the following statements is true or false by writing T or F in the answer column. A current or former employee may sue his or her employer for defamation if the employer...
-
1 Consider the following financial statement information for Orologio SpA: Calculate the operating and cash cycles. How do you interpret your answer? (40 marks) 2 You have been hired by a...
-
Toyota will bring hybrid electric automobiles to market next year priced at $27,000 (this includes a $6,750 federal tax credit). At $1.89 per gallon of gasoline, it will take 11 years to recoup the...
-
Determine the annual percentage yield for a loan that charges a monthly interest rate of 1.5% and compounds the interest monthly.
-
Describe forward scheduling.
-
FiberTech makes newsprint for newspapers at three mills, A, B, and C. The cost of producing newsprint is estimated to be $210 at mill A, $225 at B, and $220 at C. Five primary geographical markets...
-
1. Identify the operations management problems that Dr. Barr is having at the clinic. 2. How would you define the service bundle currently being offered? How is this different from the initial...
-
The property of a system depends upon its state. State True (T) or False (F)
-
In a control volume, mass, momentum and energy may flow. State True (T) or False (F)
-
Temperature is an intensive property. State True (T) or False (F)
Study smarter with the SolutionInn App