This video explains a very frequently asked interview question which is the range minimum query. I have solved this problem using 3 methods. The first method is the bruteforce approach, the second one is the efficient approach using arrays and the third approach is the segment tree approach which takes moderate time but is very useful in case your array has frequent updates. Please watch the RANGE SUM QUERY video for a detailed explanation on segment tree with code. Both CODE LINK and RANGE SUM QUERY LINK is present below. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
CODE LINK: gist.github.co...
RANGE SUM QUERY: • Sum of given range | S...
Негізгі бет Range minimum query | 3 methods | Segment tree
Пікірлер: 14