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

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -