Get Help With a similar task to - Data Structures and Algorithm

Login to view and/or buy answers.. or post an answer
Additional Instructions:

Answer question 1, question 2, and any other 2 questions from questions 3 to 6 – maximum 100 marks. You must score at least 50 to pass the assignment. 1. (25 + 15 = 40 marks) You have learned some fundamental data structure concepts such as array, queue and priority queue, stack, list and linked list, sequence, and unordered set, and you understand the concept of interface or abstract data type that defines the set of operations supported by a data structure and the semantics, or meaning, of those operations. You can use the interface of one particular data structure to define or implement the operations of a different data structure. a. (25 marks total) Describe the meaning of the essential methods add(x), deleteMin(), and size() that are supported by the priority queue interface (5 marks). Implement those methods using a singly-linked list (5 marks for each method). Analyze the running time of the add(x) and deletMin() operations based on this implementation (5 marks). b. (15 marks total) Implement the stack methods push(x) and pop() using two queues (5 marks for each method). Analyze the running time of the push(x) and pop() operations based on this implementation (5 marks). 2. (10 + 10 = 20 marks) Swap two adjacent elements in a list by adjusting only the links (and not the data) using a. singly-linked list (10 marks). b. doubly-linked list (10 marks). 3. (20 marks) Exercise 1.5. Using a USet, implement a Bag. A Bag is like a USet—it supports the add(x), remove(x), and find(x) methods—but it allows duplicate elements to be stored. The find(x) operation in a Bag returns some element (if any) that is equal to x. In addition, a Bag supports the findAll(x) operation that returns a list of all elements in the Bag that are equal to x. 4. (20 marks) Exercise 2.3. Design and implement a RandomQueue. This is an implementation of the Queue interface in which the remove() operation removes an element that is chosen uniformly at random among all the elements currently in the queue. (Think of a RandomQueue as a bag in which we can add elements or reach in and blindly remove some random element.) The add(x) and remove() operations in a RandomQueue should run in constant time per operation. 5. (20 marks) Exercise 3.12. Write a method, reverse(), that reverses the order of elements in a DLList. 6. (20 marks) Exercise 3.14. Design and implement a MinStack data structure that can store comparable elements and supports the stack operations push(x), pop(), and size(), as well as the min() operation, which returns the minimum value currently stored in the data structure. All operations should run in constant time. Guidelines for Marking Programming Assignments The following table presents the overall approach to marking a program. The first column lists the five key criteria on which your program will be marked. Functionality is the main criterion. The rest of them will receive proportionally reduced marks, depending on the percentage of functionality implemented in the program. If you have implemented only half the functionality expected in the program, don’t expect to receive full marks for documentation, test cases, and so on. Criterion Unsatisfactory < 50% Satisfactory 50%–65% Good 66%–85% Excellent 86%–100% Functionality = 20% Completed less than 70% of the requirements. Not delivered on time or not in correct format (zipped files, Moodle submission, etc.). Completed between 71% and 85% of the requirements. Delivered on time and in correct format (zipped files, Moodle submission, etc.). Completed between 86% and 95% of the requirements. Delivered on time and in correct format (zipped files, Moodle submission, etc.). Completed between 96% and 100% of the requirements. Delivered on time and in correct format (zipped files, Moodle submission, etc.). Reflection = 20% No reflection on coding habits. Minimal reflection on coding habits. Moderate reflection on coding habits. Excellent reflection on coding habits. Coding Standards = 15% No name, date, or assignment title included. Poor use of white space (indentation, blank lines). Disorganized and messy. Poor use of variables (many global variables, ambiguous naming). Includes name, date, and assignment title. White space makes program fairly easy to read. Organized work. Good use of variables (few global variables, unambiguous naming). Includes name, date, and assignment title. Good use of white space. Organized work. Good use of variables (no global variables, unambiguous naming) Includes name, date, and assignment title. Excellent use of white space. Creatively organized work. Excellent use of variables (no global variables, unambiguous naming). Documentation = 15% No documentation included. Basic documentation has been completed including descriptions of all key variables. Purpose is noted for each function. Clearly documented including descriptions of all key variables. Specific purpose is noted for each function and control structure. Clearly and effectively documented including descriptions of all key variables. Specific purpose is noted for each function, control structure, input requirements, and output. Runtime + Test Cases = 15% Does not execute due to errors. User prompts are misleading or non-existent. No testing has been completed. Executes without errors. User prompts contain little information, poor design. Some testing has been completed. Executes without errors. User prompts are understandable, minimum use of symbols or spacing in output. Thorough testing has been completed. Executes without errors. Excellent user prompts, good use of symbols, spacing in output. Thorough and organized testing has been completed and output from test cases is included. Efficiency = 15% A difficult and inefficient solution. A logical solution that is easy to follow, but it is not the most efficient. Solution is efficient and easy to follow (i.e., no confusing tricks). Solution is efficient, easy to understand and maintain. Page 1 of 1

Related Questions

Similar orders to Data Structures and Algorithm
9
Views
0
Answers
Send an email, with the current weather information from the target zip code with the weather information.
Create a web form to capture an email address and zip code along with a submit button Create a code behind to consume API from weatherapi.com Send an email, captured from the ‘email to’ textbox, with the current weather information from the t...
12
Views
0
Answers
JAVA project/paper/UML diagram
Java code (150 lines) paper(500 words) UML diagram In addition to the correctness of your code, part of your grade will be based on how organized your code is – how easy is it to read and understand. Proper spacing will aid you in this regard....
31
Views
0
Answers
Project for CS1302 using JavaFX
THE DEADLINE IS TODAY(4/21) AT 11:00!! It's not updating for some reason. I have done some of this project but it's not working and I need someone to complete it. There is a project description file, as well as my current java files. According to the desc...
13
Views
0
Answers
unity programming assignment help
Look at pdf, I can't explain well Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...