

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
idk i t sdsadasd asd asd asd as da s
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!
Remember to write your full name and student number prominently on your submission. To avoid suspicions of plagiarism: at the beginning of your submission, clearly state any resources (people, print, electronic) outside of the course materials, and the course staff, that you consulted. You must submit a PDF file and Java files (if any) with the required filename. The PDF file could be generated using LATEX(recommended), Microsoft Word (saved as PDF, not the .docx file), or other editor/tools. The submission must be typed. Handwritten submissions are not accepted.
Answer each question completely, always justifying your claims and reasoning. Your solution will be graded not only on correctness, but also on clarity. Answers that are technically correct that are hard to understand will not receive full marks. Mark values for each question are contained in the [square brackets]. Your submitted file does not need to include/repeat the questions — just write your solutions.
The assignment must be completed individually.
Objects: A collection of elements that can be compared with each other. Duplicate elements are allowed (this is why we use the term “collection” instead of “set”). Operations:
In your PDF, describe your implementation of the GOLDEN-SET by completing the following parts.
(a) Describe what data structures you use to implement the GOLDEN-SET. You may use multiple data structures that we learned in this course, and/or multiple instances of the same data structure. State clearly what are the struc- tural properties/invariants that must be satisfied by these data structures (e.g., “the size of something must be something”). (b) For each of the above operations, provide the following information:
Note: Please do not repeat algorithms or runtime analyses from the lectures — just refer to known results as needed. Hint: Consider using the heap data structure, and consider using more than one heaps.
Programming Question
The best way to learn a data structure or an algorithm is to code it up. In this assignment, we have a programming exercise for which you will be asked to write some code and submit it. You may also be asked to include a write-up about your code in the PDF file that you submit. Make sure to maintain your academic integrity carefully, and protect your own work. All code submissions will be checked for plagiarism at the end of the term. It is much better to take the hit on a lower mark than risking much worse consequences by committing an academic offence.
You are currently at floor X and you want to go to floor Y. Being an EECS 2011 trained computer scientist, you immediately take out your laptop to write a program that can tell you the minimum number of button pushes needed to take you from floor X to floor Y. Below is the specification of the program.
Input:
Requirements:
Submission: Your submission will include the following parts:
As usual, you may setup the Java project using any programming IDE of your choice and you are fully responsible for using the IDE you choose properly. Be careful: sometimes the IDE automatically inserts lines of code such as the package declaration and imports. Make sure to double-check your code before submission to remove any unnecessary those extra lines since they may cause all test cases to fail in auto-testing.