PRINT ELEMENTS IN SORTED ORDER USING ROW AND COLUMN WISE SORTED MATRIX|MATRIX|FINAL 450|LOVE BABBAR

Поділитися
Вставка
  • Опубліковано 6 вер 2024
  • PRINT ELEMENTS IN SORTED ORDER USING ROW AND COLUMN WISE SORTED MATRIX
    SOL 1. Putting the values of matrix in a vector and sort them.
    SOL 2. Using priority_queue.
    Your support can make a big difference in my content creation journey and help me in making the educational content like this....
    UPI ID: anilkumarsingh0160@okaxis
    BIT MANIPULATION PLAYLIST, Please do check it out :- • BIT MANIPULATION || FI...
    MATRIX PLAYLIST, Please do check it out : - • MATRIX || 2D ARRAY || ...
    #data_structures
    #matrix
    #final450
    #loveBabbar
    #null

КОМЕНТАРІ • 10

  • @sharanshivrampoojari1653
    @sharanshivrampoojari1653 Рік тому

    Thanks for explainatiomn bro !

  • @laxmandilliraj7379
    @laxmandilliraj7379 2 роки тому +1

    Keep On doing Good works....

    • @laxmandilliraj7379
      @laxmandilliraj7379 2 роки тому +1

      We will support

    • @nullpoint001
      @nullpoint001  2 роки тому

      Thank you very much, please do check out my bit manipulation and matrix playlist......

  • @vishalkumaragrawal4480
    @vishalkumaragrawal4480 Рік тому

    dost you explained 1st solution with complexity N^2log(N^2)--> as array contain N^2 element so sorting took that much complexity. Then again you explained the same logic bt instead of doing sorting explicitly took minHeap bt still the min heap will have n^2 elements so sol2 will also have n2log(n2) complexity.

    • @vishwaskalra8773
      @vishwaskalra8773 6 місяців тому

      Yaa both the solutions will have the same time complexity of N^2Log(N)

  • @divyanshubhargava3480
    @divyanshubhargava3480 2 роки тому

    your code is giving run time error and segmentation fault on geeks for geeks

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

      Try,
      Code 1 : -
      vector sortedMatrix(int N, vector Mat) {
      vectorv;
      int k=0;
      for(int i=0;i

    • @divyanshubhargava3480
      @divyanshubhargava3480 2 роки тому +1

      @@nullpoint001 Thanks now code is passing all test cases.

  • @harshvardhan7932
    @harshvardhan7932 Рік тому

    Pdh lo fir padhana