Meet in the middle algorithm

preview_player
Показать описание
This video explains the meet in the middle algorithm which is a very unique algorithm used to find the closest subsequence sum. It requires you to know finding all possible subset sums and use of binary search lowerbound. A practice problem for this algo is leetcode 1755.
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:

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

The video's Heading is Meet in the middle algorithm, but you never really explained why this is called meet in the middle algorithm ? what is the intuition behind it ? how can this idea be generalized to other such problems ?

sumitkumarmahto
Автор

Really clear and concise on the explanation part. The thing which helped most was the way in which you had prepared the notes beforehand and they really addressed every part of the problem and the algorithm as to why is it beneficial to use this in this particular case.
Thank You!

saumyaranjan
Автор

4:04 Sir, One Small correction in the video.
The closeset sum can be great than the goal, but should be closest.

surendharv
Автор

lower_bound definition is different if compared with lower_bound stl of cpp

hijibiji
Автор

really neat and systematic explanation. This channel is a gem!! Thanks a lot, will continue watching and refer the channel to my friends.

casinarro
Автор

One request sir your videos are really beneficial but can you make more videos for greedy playlist plzzz plzz

sonumondal
Автор

very understandable and amazing explanation. thank you very much for the video

shivanggautam
Автор

hows you calculated 2 raise to the power 20 equivalent to 10 raise to the power 6 without calculation?

bhuvneshvarma
Автор

Yes I am also requesting you to make videos on greedy technique it will be beneficial in the interview please

yogeeshrsyogeeshrs
Автор

how does deviding the arrray into two parts explore all subset sums ?
for eg -> 3 + (-2) = 1 is missing !

sdmfslkdm
Автор

@techdose sir lower_bound definition is different in this case for 13 it wil return n size of array

HimanshuSingh-rmsd
Автор

Anybody seeing my comment pls answer my doubt that is subset sum problem works only for positive numbers right or it works for any integers ?

harisai
Автор

In the code why have you also used the previous element of the lower bound

ayushsaxena
Автор

why subset sum is not a feasible soln can you explain. If we use binary seach with subset sum(using dp) then it can be solved in log(sum)*sum*N right ?

jatinarora
Автор

We have considered time complexcity of sorting the right half

amboojmittal
Автор

Sir please please upload a sheet for complete beginners which support to join your course

Lucifer-xtun
Автор

YOU SAID WRONG DEFINITION OF LOWER BOUND. IT RETURNS EQUAL OR JUST GREATER VALUE

deepeshb
Автор

Your lower bound terminology is wrong. You are mixing Floor of an array with lowerBound.

pratyushbhatt