algorithm - highest parallel event time -
i've had interview question , know how solve that: have tried find answer on google , here no success "given long list of events start point , end point, find time intersection highest "
not allowed use complex data structure
thank
sort times ascending order , run along them, incrementing counter @ start , decrementing @ end. time highest intersection should time when counter reached highest value.
Comments
Post a Comment