Segment Tree | Update Query | Story To Code | Video 2

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • iPad PDF Notes - github.com/MAZHARMIK/Intervie...
    Whatsapp Community Link : www.whatsapp.com/channel/0029...
    This is the 2nd video of our playlist "Segment Tree Concepts & Questions". Find the Details below :
    Video Name : Segment Tree | Update Query | Story To Code | Video 1
    Video # : 2
    🔍 Unraveling Segment Tree : A Journey into the Depths of Code
    🎥 Welcome to the 2nd Video of my Segment Tree Concepts & Questions Playlist! 🚀 In this enlightening video, we will see how segment trees help to do update query operations efficiently.
    🔍 What's Inside ?
    🔗 We will see how segment trees help to do update query operations efficiently.
    👩‍💻 Who Should Watch ?
    This playlist is for everyone but best suited for Freshers who are new to Segment Tree.
    🚀 Embark on the Segment Tree Adventure Now!
    My DP Concepts Playlist : • Roadmap for DP | How t...
    My Graph Concepts Playlist : • Graph Concepts & Qns -...
    My Recursion Concepts Playlist : • Introduction | Recursi...
    My GitHub Repo for interview preparation : github.com/MAZHARMIK/Intervie...
    Subscribe to my channel : / @codestorywithmik
    Instagram : / codestorywithmik
    Facebook : / 100090524295846
    Twitter : / cswithmik
    Summary : In this video we will see how segment trees help to do update query operations efficiently. We will also see how in the "Range Sum Query" problem, the update query is O(n) and how segment tree helps to reduce this time to O(log(n)). We will understand it from the tree diagram and also convert the story to code to write the updateSegmentTree function.
    ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
    ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
    ╠╗║╚╝║║╠╗║╚╣║║║║║═╣
    ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
    ✨ Timelines✨
    00:00 - Introduction
    1:11 - Why Prefix array takes O(n) update time
    5:34 - Segment Tree comes to action
    8:38 - Visualise from Tree Diagram
    14:27 - Story To Code
    19:54 - Time Complexity O(log(n))
    #codestorywithMIK
    #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #2024 #newyear #RecursionExplained #CodingJourney #Programming101 #TechTalks #AlgorithmMastery #Recursion #Programming #Algorithm #Code #ComputerScience #SoftwareDevelopment #CodingTips #RecursiveFunctions #TechExplained #ProgrammingConcepts #CodeTutorial #LearnToCode #TechEducation #DeveloperCommunity #RecursiveThinking #ProgrammingLogic #ProblemSolving #AlgorithmDesign #CSEducation
    #segmenttree #segment #rangequeries

Komentáře • 37

  • @mukulverma9238
    @mukulverma9238 Před měsícem +16

    So excited to conquer this data structure as well! 🎉

  • @22gauravkumar70
    @22gauravkumar70 Před měsícem +12

    Maza aagya bhaiya , You are the best , please segment tree pura daal dijiye jldi

  • @gui-codes
    @gui-codes Před měsícem +6

    festival k din bhi time nikal rahe ho bhai video k lie. hats off to you.

  • @anushasingh5562
    @anushasingh5562 Před měsícem +1

    hats off to your explanation
    You make each and every topics a piece a cake

  • @chitranshjain9714
    @chitranshjain9714 Před měsícem +5

    amazing
    please complete dp concept playlist

  • @manishkumarprajapati6280
    @manishkumarprajapati6280 Před měsícem +1

    awesome yaar. This playlist is a blessing 😇😇 Please keep constructing this playlist.
    #NeverBackDownNeverGiveUp

  • @priyanshkumariitd
    @priyanshkumariitd Před měsícem +3

    Hats of to your consistency bhaiya !!

  • @lostcyrus8578
    @lostcyrus8578 Před měsícem +3

    I was waiting for the part 2. Understood the whole concept . Need more such videos please❤❤

  • @pankajkashyap2892
    @pankajkashyap2892 Před měsícem

    waiting for remaining lectures to come as soon as possible❤❤

  • @mbm.editzz
    @mbm.editzz Před měsícem +2

    thank you

  • @anuppatankar4294
    @anuppatankar4294 Před měsícem +1

    Great video 👍🏻

  • @aws_handles
    @aws_handles Před měsícem +3

    Is consistency ko salute hai yaar 🫡
    Har din video bana and that too good is not an easy task

  • @_say__my_name03
    @_say__my_name03 Před měsícem +2

    Man you are the best teacher on .You can understand anyone and the way of teaching is superb top notch...

  • @dayashankarlakhotia4943
    @dayashankarlakhotia4943 Před měsícem +2

    Well explained understood 👏 🎉

  • @anjanasahay2172
    @anjanasahay2172 Před měsícem +2

    Post daily ❤❤

  • @riturajprasad3060
    @riturajprasad3060 Před měsícem +4

    completed this also....next lecture sir....thankyou soo much...

  • @satendra6200
    @satendra6200 Před měsícem +1

    Please try to upload each contest solution this will be more helpful for us

  • @user-ub2is4rs4x
    @user-ub2is4rs4x Před měsícem

    Crystal clear ❤

  • @venkatarohitpotnuru38
    @venkatarohitpotnuru38 Před měsícem +2

    Bhaiya please continue dp concept playlist

  • @shabananoor9423
    @shabananoor9423 Před měsícem +1

    ❤❤

  • @ugcwithaddi
    @ugcwithaddi Před měsícem

    Thanks a lot

  • @abhinavnarang4369
    @abhinavnarang4369 Před měsícem +2

    bhai live coding kyu nhi krte that was the best part? do that also , btw as always content is very good

  • @tanishchordia4813
    @tanishchordia4813 Před měsícem

    Mik just a small request from my side, Please Complete the Dp concepts and Questions vaala playlist as soon as possible.

  • @insidious_681
    @insidious_681 Před měsícem

  • @anjumarakhan8647
    @anjumarakhan8647 Před měsícem

    Hello mazhar bhai

  • @user-is6pf9gh2r
    @user-is6pf9gh2r Před měsícem

    mik bhaiya make questions like sort till a given index

  • @Sumit-wy4zp
    @Sumit-wy4zp Před měsícem

    please upload new video ... questions practice 🤩🤩🤩🤩

  • @pokeindia5361
    @pokeindia5361 Před měsícem

    Bhaiya please *longest valid parantheses* Q bataiye please

  • @Ayush_mehra07
    @Ayush_mehra07 Před měsícem

    Please solve question also for this topic

  • @bccjadademicsworld4683
    @bccjadademicsworld4683 Před měsícem

    Early waiting for 3rd video, kab aa rh hai

  • @abhisheknegi9448
    @abhisheknegi9448 Před měsícem

    Bro will you explain leetcode's latest weekly contest Q3 and 4?

  • @mbm.editzz
    @mbm.editzz Před měsícem

    3rd part kb ayga sir?

  • @22gauravkumar70
    @22gauravkumar70 Před měsícem

    bhaiya segment tree ka next video daal do raha nhi jaa raha

  • @salmanrayeen8693
    @salmanrayeen8693 Před měsícem

    Aaj 17 Jun ka daily challenge nahi aya aaj ?

    • @gui-codes
      @gui-codes Před měsícem +1

      channel me jakar community section me click karo, waha dala hai aaj k POTD ka post

  • @Stressful_Jindagi
    @Stressful_Jindagi Před měsícem

    void build(int ind,int low,int high, int arr[], int seg[]){
    if(low==high){
    seg[ind]=arr[low];
    return;
    }
    int mid=(low+high)/2;
    build(2*ind+1,low,mid,arr,seg);
    build(2*ind+2,mid+1,high,arr,seg);
    seg[ind]=min(seg[2*ind+1],seg[2*ind+2]);
    }
    int query(int ind,int low,int high, int l, int r, int seg[]){
    //no overlap
    // [l,r] [low,high] || [low,high] [l,r]
    if(r

  • @sahilanand30
    @sahilanand30 Před měsícem