Difference Array | Range update in O(1)

preview_player
Показать описание
This video explains the difference array data structure which is used for range update in an array in constant time O(1). The difference array uses the technique of building gradient array and making exactly 2 changes per query in constant time in an array. A practice problem for this is range addition from leetcode 370.

CODE LINK is present below as usual. 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 :)

======================================PLEASE DONATE=============================
==============================================================================

=======================================================================
USEFUL LINKS:

RELATED LINKS:

Рекомендации по теме
Комментарии
Автор

This video helped me so much to understand the solutions for Leetcode 1109 Corporate Flight Bookings.
Big thanks to Techdose!

eugeneyap
Автор

Don't know whether you will watch it or not? But, again @techDose, just letting you know, again that's stuff you have done, is GOD's own work, thank you for from bottom of my heart, thanks!!!

coding
Автор

Thanks for this, just came here after completing, TUF !!!

coding
Автор

Can you please make a video on prolog trees as well I got a final in 2 days thanks

shahmir
Автор

Sir Aap Konsa WhiteBoard Software use karte ho Likhke Samjhane ke liye?

harsshp
Автор

How's this different from Line Sweep Algorithm?

phoenix__
Автор

Tried to approach you on whatsapp but no response

amboojmittal