1- question seems to be a little too vague... if it's a mail server application, I'm guessing you would use some kind of persistent storage... maybe a no-sql solution like cassandra... u could use a tale with the user ID and mail status as key to store mails...
2- priority queues, maybe 3- a sorted tree so u can search by range... you could make it better by using a hash map that maps from a short date string (yyyy-MM-dd) to the sorted tree where events are stored and you could binary search based on ur range On Saturday, March 8, 2014 8:28:35 AM UTC-8, atul007 wrote: > > 1) - When u login, it retrieves all the unread mails only. Which data > structure should you use ? > > 2)- If you get an event invitation then u have to be notified . eg if u > have two event invitations, one is in the next hour and other one 2 months > later, the one that is tomorrow will be given a higher priority and sent to > u before any other event or mail.What data structure should you use? > > 3) - If the events are added to your calendar on the server ,the server > should handle the query : > > Find if there is a time slot on a particular date in a particular time > range of the given duration. What data structure will you use ?eg - find a > free timeslot on 31st of august between 6 AM to 7 PM of 30 min duration. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
