Leetcode 2392. Build A Matrix With Conditions | Weekly Contest 308.

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024
  • Use coupon ALISHA on any GeeksforGeeks course to get 10% discount:
    practice.geeks...
    Connect with me on LinkedIn : / alisha-parveen-80579850
    Check out our other playlists:
    Dynamic Programming:
    • Dynamic Programming
    Trees:
    • Trees
    Heaps and Maps:
    • Heaps and Maps
    Arrays and Maths:
    • Arrays and Maths
    Bit Manipulation:
    • Bit Manipulation
    Greedy Algorithms:
    • Greedy Algorithms
    Sorting and Searching:
    • Sorting and Searching
    Strings:
    • Strings
    Linked Lists:
    • Linked Lists
    Stack and Queues:
    • Stacks and Queues
    Two Pointers:
    • Two pointers
    Graphs, BFS, DFS:
    • Graphs, DFS, BFS
    Backtracking:
    • Backtracking
    Non- DSA playlists:
    Probability:
    • Probability
    SQL-Basic Join functions:
    • SQL - Basic JOIN Funct...
    SQL-Basic Aggregate functions:
    • SQL-Basic Aggregate Fu...

ความคิดเห็น • 39

  • @probabilitycodingisfunis1
    @probabilitycodingisfunis1  2 ปีที่แล้ว +1

    vector buildMatrix(int k, vector& rowConditions, vector& colConditions) {
    vectorrow_order = kahn(rowConditions, k+1); //[1,4,3,2]
    vectorcol_order = kahn(colConditions, k+1); // [1,4,2,3]
    // map -> {1 :0, 4:1, 2:2, 3:3}
    unordered_mapm;
    if(row_order.size()

  • @rakeshnaidu1998
    @rakeshnaidu1998 หลายเดือนก่อน

    Leetcode POTD. Good explanation. Thank you.

  • @maharshiagola3998
    @maharshiagola3998 2 ปีที่แล้ว +3

    Awesome video ma'am! Thanks for the great explanation, owe my career to you

  • @iammiban
    @iammiban หลายเดือนก่อน

    Thankyou so much! This literally cleared so many doubts not only regarding the question but also regarding writing clean codes with c++

  • @samarth2915
    @samarth2915 หลายเดือนก่อน

    actually pretty good Explanation !

  • @zishan53
    @zishan53 ปีที่แล้ว +1

    Mam please aap bhot dino se active nhi hai contest review nhi de rhi hai ...Aap ka content bhot hi acha hota hai please post video on Leetcode contests

  • @raushankumar6993
    @raushankumar6993 10 หลายเดือนก่อน

    thanks

  • @himu1901
    @himu1901 2 ปีที่แล้ว +1

    Thanks for such nice explanation!

  • @sayyadazeem8781
    @sayyadazeem8781 2 ปีที่แล้ว +1

    Awesome explanation
    U made hard prblm easy by ur explanation.
    Thank u so much. Please Keep making videos for upcoming contests also

  • @Hunting996
    @Hunting996 2 ปีที่แล้ว

    I'll probably not get an answer but still, when I opened my soft Roll I couldn't place the "notes" or however you call them that finely, by

  • @pranaynagpure2804
    @pranaynagpure2804 2 ปีที่แล้ว +1

    great solution, i was thinking of calculating all topo sorts and then matching row and column conditions , also canyou please mention complexity of algo

  • @zishan53
    @zishan53 ปีที่แล้ว +1

    Maam Please aaap Leetcode contest ka discussion krriye Ma'am

  • @systemflaws
    @systemflaws 2 ปีที่แล้ว +1

    It would be beneficial if you also mentioned time and space complexity. Also, many thanks for your clear explanation!

    • @probabilitycodingisfunis1
      @probabilitycodingisfunis1  2 ปีที่แล้ว

      Have mentioned, it is O(k2)

    • @systemflaws
      @systemflaws 2 ปีที่แล้ว

      @@probabilitycodingisfunis1 Maybe I skipped that part. Thank you!

  • @vinodhkumar5329
    @vinodhkumar5329 2 ปีที่แล้ว

    addicted to this channel.Thank you so much mam

  • @surajitroy_roll-5023
    @surajitroy_roll-5023 2 ปีที่แล้ว

    Mind Blowing

  • @aryangrover7475
    @aryangrover7475 2 ปีที่แล้ว

    Amazing Explanation

  • @Rahulkumar-op9lu
    @Rahulkumar-op9lu 2 ปีที่แล้ว

    nice explanation you made it easy problem .looking forward to learn lot from you

  • @Sanyamjain77
    @Sanyamjain77 2 ปีที่แล้ว

    The explanation was very good.
    Thanks for this solution video.

  • @MGtvMusic
    @MGtvMusic 2 ปีที่แล้ว

    Java solution
    class Solution {
    public int[][] buildMatrix(int k, int[][] rowConditions, int[][] colConditions) {

    List rowOrder = topoSort(rowConditions,k);
    List colOrder = topoSort(colConditions,k);

    if(rowOrder.size()

  • @madhukarkumar2668
    @madhukarkumar2668 2 ปีที่แล้ว

    HEY YOU soft LIKE AI AND TNice tutorialS VID SO HELPFUL

  • @syedarfath9298
    @syedarfath9298 2 ปีที่แล้ว

    Amazing explanation.
    How did you deduced this problem is a graph problem. Is it because of ordering of numbers, leading to topological sort?

  • @kwakukusi4094
    @kwakukusi4094 2 ปีที่แล้ว

    i love this channel

  • @prithvijitbasak
    @prithvijitbasak 2 ปีที่แล้ว

    God level explanation. 🔥🔥

  • @sahilanand30
    @sahilanand30 2 ปีที่แล้ว +1

    Nicely explained
    Can you please share some good resource to learn graph

    • @probabilitycodingisfunis1
      @probabilitycodingisfunis1  2 ปีที่แล้ว +1

      @Sahil Anand, would recommend GeeksforGeeks / Abdul Bari's TH-cam Channel / Prateek Narang course on Graphs on Udemy

    • @gmgrhythm2284
      @gmgrhythm2284 2 ปีที่แล้ว

      code n code graph series

  • @sefou519
    @sefou519 2 ปีที่แล้ว

    Sa here bro

  • @reshmaparveen6679
    @reshmaparveen6679 2 ปีที่แล้ว

    Tqs ali i m yr big fan 🎉🎉

  • @AmanSharma-vb5jl
    @AmanSharma-vb5jl 2 ปีที่แล้ว

    Hey Alisha, Interview me DP me "top down with memorization" approach se batane se kam chal jata h kya ya phir interviewer ko "bottom up iterative" bhi chahiye hota h

  • @tanaymalik4778
    @tanaymalik4778 2 ปีที่แล้ว

    di ab toh apka placement ho gaya, phir kyun practice kar rahe?