Priority queues

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 3

  • @good.fornthng
    @good.fornthng 3 роки тому

    Isn't it O(root(n) * root(n)) = O(n)

    • @priyampaulLETSROCKSS
      @priyampaulLETSROCKSS 3 роки тому +2

      No, First we are finding the correct row position, and then in that row, we are finding the correct position to enter the element with its priority which here is 11, and this operation of finding the correct position is being performed for a particular row and not for all the rows in the matrix.

    • @simranjeetsingh6728
      @simranjeetsingh6728 10 місяців тому +2

      It is O(2* sqrt(n)) which is O(sqrt(n))