Sticks length not required . Think in coordinate geometry in 3D .

Also for Checkin and Checkout question - Make a flag array associated with 
each element of the list and initialize the every element to *{1}* and 
traverse the checkout list (checkout[i]) . Now do binary search for an entry 
in the checkin list for the time just greater than a given checkout time i.e 
checkin[j] > checkout[i] and make the flag[j] = flag[j] -1 . Now keep a 
counter *count *to count the number of elements in the party at a given 
point . When you traverse the list add flag[i] to *count *i.e* *count + = 
flag[i] . Find the maximum value of count and at the that moment there would 
be max no of people in the party .

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/Z8KZ11K2AuoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to