A C skip list program to emulate a social network platform

Listed in the file as HW5

Get Help With a similar task to - A C skip list program to emulate a social network platform

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

CSE 2010, HW5, Fall 2020 Due Thu Oct 29 at the start of your lab section; Submit Server: class = cse2010, assignment = hw5SxIndividual Due Thu Oct 29 at the end of your lab section; Submit Server: class = cse2010, assignment = hw5SxGroupHelp x is 12, 34—your merged section number (or j for java submissions). To improve the experience of customers, an online social network site would like to add a feature that can display and share a timeline of major events/photos of a user. The user might have many events, given a time range, how would you find/display events efficiently? The goal of HW5 is to manage the timeline and allow the user to specify a time range to display/share his/her major events. To improve efficency, your implmementation uses a skip list that includes the following operations: • get(skiplist, key) // if key exists, return value associated with key; otherwise, return NULL • put(skiplist, key, value) // if key doesn’t exist, add entry and return NULL; otherwise, replace value and return the old value • remove(skiplist, key) // if key exists, remove entry and return its value; otherwise, return NULL • floorEntry(skiplist, key) // return the entry with the largest key less than or equal to key; return null if no such entry exists • ceilingEntry(skiplist, key) // return the entry with the smallest key greater than or equal to key; return null if no such entry exists • subMap(skiplist, key1, key2) // return all entries with key such that key1 ≤ key ≤ key2 Use getRandHeight() in fakeRandHeight.c (FakeRan- domHeight in java) for put(key, value) (to facilitate eaiser debugging and testing) [gcc -o hw5 hw5.c fakeRandHeight.c]. Program files are on the course website. We will evaluate your submissions on code01.fit.edu so we strongly recommend you to test your programs on code01.fit.edu. To preserve invisible characters, we strongly recommend you to download and save, NOT copy and paste, input data files. Input: Input is from the command-line arguments for hw5.c: • filename of actions, each line has one of the following ac- tions: – DisplayEvent date – AddEvent date event – DeleteEvent date – DisplayEventsBetweenDates startDate endDate – DisplayEventsFromStartDate startDate – DisplayEventsToEndDate endDate – DisplayAllEvents – PrintSkipList For simplicity, dates are in MMDD format (MM is 01-12, DD is 01-31). You may assume the dates are unique (a more detailed timestamp would be unique in the real-world) and each event is at most 100 characters. You may assume the skip list can have a height of at most 10. Sample input is on the course website. Output: Output goes to the standard output (screen), each line has a result for the corresponding action: • DisplayEvent date event/none • AddEvent date event success/replacingExistingEvent • DeleteEvent date success/noDateError • DisplayEventsBetweenDates startDate endDate date1:event1 ... or none • DisplayEventsFromStartDate startDate date1:event1 ... or none • DisplayEventsToEndDate endDate date1:event1 ... or none • DisplayAllEvents date1:event1 ... or none • PrintSkipList (Sh) empty ... (S1) date1:event1 ... (S0) date1:event1 ... Sample output is on the course website. Submission: Submit hw5.c that has the main method, and other program files. Submissions for Individual and GroupHelp have the same guidelines as HW1. Note the late penalty on the syllabus if you submit after the due date and time as specified at the top of the assignment. 1

AddEvent 0102 running AddEvent 0202 shopping AddEvent 0105 playBasketball (S2) empty (S1) 0202:shopping (S0) 0102:running 0105:playBasketball 0202:shopping AddEvent 0502 homework AddEvent 0702 restaurant AddEvent 1102 school (S3) empty (S2) 0502:homework (S1) 0202:shopping 0502:homework 1102:school (S0) 0102:running 0105:playBasketball 0202:shopping 0502:homework 0702:restaurant 1102:school

AddEvent 0102 running AddEvent 0202 shopping AddEvent 0105 playBasketball PrintSkipList AddEvent 0502 homework AddEvent 0702 restaurant AddEvent 1102 school PrintSkipList

Related Questions

Similar orders to A C skip list program to emulate a social network platform
30
Views
0
Answers
Advance topics in machine learning (Kernels) 2 questions.
Any 2/3 Questions need answering on Advance topics in machine learning (Kernels). relevant notes can be shared upon request....
17
Views
0
Answers
Using R programming to perform functions and do work.
The expectations are to use R programming to answer the questions attached the file, and the result is also to be a .r file....
13
Views
0
Answers
write up a report using c programming.
Using the knowledge acquired from this module write a descriptive report to solve the programming problems listed below. The word count limit is 500 words You must include the full code implementation as appendix! I recommend you use Courier New size 1...
16
Views
0
Answers
Analyse requirements and select appropriate solutions. Design programmes that use appropriate data structures
The assignment requires you to select and implement appropriate data structures, design and implement algorithms and create the relevant software applications that will allow a user to store, update and manipulate the data relating to the operations of an...