Segment Tree Crash Course | Lazy Propagation | Generic Segment Tree Code + Problems

  Рет қаралды 5,078

codeWithAryan

codeWithAryan

Күн бұрын

In this video, I'll talk about Segment Tree Crash Course | Lazy Propagation | Generic Segment Tree Code + Problems
Complete Notes & Codes will be available at: codeWithAryan.com
Fenwick Tree & Why Other Range Queries are insufficient - • Fenwick Tree Complete ...
Issues in using Fenwick Tree for non Invertible Queries - • 3161. Block Placement ...
DFS & Using Children in Binary Tree - • 124. Binary Tree Maxim...
- Segment Tree Code - github.com/aryan-0077/Competi...
- Segment Tree Lazy Propagation Code - github.com/aryan-0077/Competi...
- Segment Tree Generic Code - github.com/aryan-0077/Competi...
Let's Connect:
📱Discord (Join Community) : / discord
📝Linkedin: / aryan-mittal-0077
📸 Instagram: / codewitharyanbhai
💻 Twitter - / aryan_mittal007
🤖 Github: github.com/aryan-0077
Practice Problems:
- Count of Smaller Numbers after Self - • 315. Count of Smaller ...
- Block Placement Queries - • 3161. Block Placement ...
- Classic(17) / Lazy Propogation(10) / Node as Vector(2) / Seg Tree + DP(3) / Seg tree + Bits(2) / Seg Tree + Tree(7) - codeforces.com/blog/entry/22616
- CP Algorithms Practice Examples & Problems - cp-algorithms.com/data_struct...
About Me:
I am Aryan Mittal - A Software Engineer in Goldman Sachs, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
✨ Timelines✨
0:00 - Course Overview
2:58 - Why Segment Tree [Benefits of Segment Tree]
10:42 - What is Segment Tree & Its Representation
17:16 - Build Segment Tree
25:17 - Query Segment Tree
36:59 - Time Complexity of Query Operation
41:40 - Point Update in Segment Tree
45:58 - Segment Tree Code
51:00 - Segment Tree with Lazy Propagation
1:00:02 - Range Updates
1:05:50 - Code Explanation of apply & pushDown
1:14:34 - combine & apply Variations to look for
1:17:32 - Complete Lazy Propagation Code Explanation
1:19:16 - Segment Tree Generic Code With Lazy Propagation
1:45:28 - Extras for Segment tree
1:48:10 - P1 - Find Min & freq of Min in a Range
1:57:00 - P2 to P10 Problems Discussed
2:03:00 - Please Share & Like if you liked it ❤️
✨ Hashtags ✨
#programming #Interviews #leetcode #faang #maang #datastructures #algorithms

Пікірлер: 24
@codeWithAryanBhai
@codeWithAryanBhai 26 күн бұрын
A small add on, for primitive types (int, double, float). ['const int& v' is a bit costlier operation than 'int v'] due to de-referencing, and incase of primitive type is cheaper to copy, while 'const int& nums' or 'const update& upd' will be useful. This performance difference is minimal but in Leetcode can be a deal breaker for few test cases.
@NAGARJUNAKOLLOJU
@NAGARJUNAKOLLOJU 6 күн бұрын
Very underrated video, big thanks for explaining it in such a easy peasy way! Kudos to you my brother.
@advaithmahendrakar
@advaithmahendrakar 28 күн бұрын
Thank you very much!! Please complete Backtracking and Graphs also
@phoddaal7130
@phoddaal7130 11 күн бұрын
Massive Respect For You Bhaiya Kya samajhaya aapne Super Duper, woh bhi ek single take mein ye cheez or jyada kabilay tareef lagi. Thank u sooooo much and As I always say to you, You Are Amazing.❤❤❤❤
@satwiktatikonda764
@satwiktatikonda764 25 күн бұрын
thanks a lot for this quality content and kindly continue in English only it helps for students from various parts of country like me
@sohaghodeswar8671
@sohaghodeswar8671 27 күн бұрын
Hey aryan ! Just recently discovered your channel and you are amazing not only as a teacher but your overall persona and attitude is what makes you special ! Believe me i checked more than 50+ videos within 2 day ! ( Ofcourse your main channel videos) Hey apart from coding , i would like you to make videos on how you managed to take time for upsc prep ( bcoz i also want to prep for other exams along with coding)* what you did in your 1st ,2nd , 3rd.. year ! And more of college stories ! I know i am asking too much but if you have leisure time then would love to know ! Ps: keep posting everyday!
@DreamFist
@DreamFist 27 күн бұрын
waited for this !! Thank you so much bhaiya!
@globalcuber9816
@globalcuber9816 28 күн бұрын
Thank u so much aryan
@slayer8792
@slayer8792 25 күн бұрын
very clear explanation ,Nice
@23cash86
@23cash86 4 күн бұрын
Amazing
@sukhpreetsingh5200
@sukhpreetsingh5200 27 күн бұрын
Thanku so much
@rajrajesh1669
@rajrajesh1669 28 күн бұрын
@pratyushkumar2843
@pratyushkumar2843 27 күн бұрын
🔥
@syedmohammadarsalan2583
@syedmohammadarsalan2583 26 күн бұрын
Thanks sir
@GiriBalan-nz9ym
@GiriBalan-nz9ym 4 күн бұрын
aryan can you make dp crash course
@user-yn7rr6eh5p
@user-yn7rr6eh5p 23 күн бұрын
have i to memorize this code or not ?
@abhinavnarula7300
@abhinavnarula7300 23 күн бұрын
Can someone pls provide the generic code in python?
@vinamrasangal8436
@vinamrasangal8436 27 күн бұрын
but ye toh hindi channel tha na ?
@digitalgandu1511
@digitalgandu1511 9 күн бұрын
pehle khud padhlo fir padhana
@digitalgandu1511
@digitalgandu1511 9 күн бұрын
mil tu bahar
@digitalgandu1511
@digitalgandu1511 9 күн бұрын
sorry
FASTEST Way To Learn Coding and ACTUALLY Get A Job
10:44
Brian Cache
Рет қаралды 956 М.
We Got Expelled From Scholl After This...
00:10
Jojo Sim
Рет қаралды 66 МЛН
Can teeth really be exchanged for gifts#joker #shorts
00:45
Untitled Joker
Рет қаралды 17 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 22 МЛН
Why Does Scrum Make Programmers HATE Coding?
16:14
Thriving Technologist
Рет қаралды 496 М.
C++ vs Rust: which is faster?
21:15
fasterthanlime
Рет қаралды 378 М.
how Google writes gorgeous C++
7:40
Low Level Learning
Рет қаралды 796 М.
A Simpler Way to See Results
19:17
Logan Smith
Рет қаралды 98 М.
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
Machine Code Explained - Computerphile
20:32
Computerphile
Рет қаралды 109 М.
The Traveling Salesman Problem: When Good Enough Beats Perfect
30:27
Why are you not creating anything in c++ ?
14:46
Chai aur Code
Рет қаралды 83 М.
We Got Expelled From Scholl After This...
00:10
Jojo Sim
Рет қаралды 66 МЛН