Блог пользователя JulitoPeligro

Автор JulitoPeligro, история, 2 года назад, По-английски

I have multiple queries and queries are of 2 types and i also have empty stack like datastructure but i can remove any element in a stack in 0(1) .If given type 1 query i need to add that element into the stack. If given type 2 i need to remove the element which has highest frequency in the stack and if there are multiple elements with highest frequency i need to remove the element which is near to the top of stack. n<=10^5

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится