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

Popular posts from this blog

command line - Use qwinsta in PowerShell ISE -

java - Incorrect order of records in M-M relationship in hibernate -

php - I want to create a website for polls/survey like this http://www.poll-maker.com/ -