Questions tagged [maximumslidingwindow]

2 questions
1
vote
1 answer

Remove element from the Priority queue

// This example demonstrates a priority queue built using the heap interface. package main import ( "container/heap" "fmt" ) // An Item is something we manage in a priority queue. type Item struct { value int // The value of the…
Gourav
  • 1,765
  • 2
  • 15
  • 16
0
votes
2 answers

Maximum Number of Overlapping Intervals

this question came in my onsite Amazon interview. Can someone come up with an optimizated solution? What data structure would you use to store the sessions? Given the start and end time of a session, find the maximum number of sessions that were…