Consider a digital personal assistant similar to Alexa and Siri that could manage your schedule. How would you design a tool such that it can efficiently find events during a certain period of time (without the speech recognition/generation component)?
The goal of HW5 is to allow the user to specify a time range to get the corresponding events. Also, we would like the user to be able to add and cancel events as the user's schedule changes. To improve efficiency, your implementation uses a Skip List that has at least the following operations:
Use getRandHeight() in fakeRandHeight.c (FakeRandomHeight.java in java) for put(key, value) (to facilitate eaiser debugging and testing) [gcc -o hw5 hw5.c fakeRandHeight.c]. You may rewrite/modify doublyLinkedList.c/h (DoublyLinkedList.java). Program files are on the course website. We will be evaluating your submission on code01.fit.edu; we strongly recommend you to ensure that your submission runs on code01.fit.edu.
Input: The command-line argument for hw5.c (HW5.java) is the name of a file, which has one of the following actions on each line:
For simplicity, time is an integer in MMDDHH format and date is in MMDD format (MM is 01-12, DD is 01-31, and HH is 00-23) [leading zeros are optional]. The timestamps are unique and each timestamp can only have at most one event. Sample input is on the course website.
Output: Output goes to the standard output (screen), each line has a result for the corresponding action:
(Sh) empty
...
(S1) time1:event1 ...
(S0) time1:event1 ...