Books Allocation Problem Using Binary Search | FREE DSA Course in JAVA | Lecture 59

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

TAP ACADEMY

TAP ACADEMY

Күн бұрын

We are going to solve an advanced binary search question asked by companies like Google.
The question is popularly known as the book allocation problem.
In this question, you are given an array of books where each element denotes the number of pages in a book.
Now you are given a value b which is the number of students between whom you have to allocate the book such that the student who gets the maximum pages should be the minimum of all maximum possible cases.
There are some other conditions associated with the program:-
1. One book can be allocated to one student only
2. Each student should get at least one book
4. Books should be allocated in a continuous manner
4. All books should be allocated
Let's see how this program can be solved using the binary search algorithm and wheat make this book allocation program is special program that it is being asked in companies like Google.
For more information, fill out this form: forms.gle/8eiUmM92Fx563Aen9
or call us at 8884881203
Facebook: / thetapacademy
Instagram: / tapacademy_online
Linkedin: / 73820805
Website: www.thetapacademy.com​

Пікірлер: 14
@saurabhdwivedi7699
@saurabhdwivedi7699 8 ай бұрын
I think most underrated education channel with such a high quality content ❤.
@prudhvirajmacherla9854
@prudhvirajmacherla9854 Жыл бұрын
Sir i have no words to appreciate your efforts
@TAPACADEMY
@TAPACADEMY Жыл бұрын
Thanks a ton
@ADK00787
@ADK00787 Жыл бұрын
Very well explained it. Thank You. Pls upload more DSA videos
@Er_IT_prashantjha
@Er_IT_prashantjha 9 ай бұрын
Awesomely explained 😃👍🏻
@thellaidhinesh8646
@thellaidhinesh8646 Жыл бұрын
awesome work
@ArunKumar-vd8zt
@ArunKumar-vd8zt 3 ай бұрын
if u believe be or not one of best explaination i have ever seen in youtube 🫂
@negativdomain1370
@negativdomain1370 Жыл бұрын
Nice explanation 😇😇.
@Engineering_Unlocked
@Engineering_Unlocked Жыл бұрын
bhaiya sch mein mja aa gya
@abhishekjain8809
@abhishekjain8809 11 ай бұрын
Sir I tried this approach. You told that low should be min element from the array. but when I submit my code its not pass all the test cases. but if I get low value is max element from the array then it pass all the test cases.
@saiakshagn3553
@saiakshagn3553 10 ай бұрын
You are correct bro because The minimum possible answer could be when number of student is equal to the number of book (i.e, M == N) , In this case all the students will get at most one book. So, the result would be the maximum number of pages among them (i.e, maximum(pages[])).
@kunalmane-pl8vx
@kunalmane-pl8vx Жыл бұрын
Sir plz take aggressive cow problem also
@venuvardhan8322
@venuvardhan8322 10 ай бұрын
Sir take low as maximum in arrays
@ritvikindupuri2388
@ritvikindupuri2388 4 ай бұрын
shouldn't it be students >= b bc you can't do 2 > 2
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 20 МЛН
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 15 МЛН
小蚂蚁被感动了!火影忍者 #佐助 #家庭
00:54
火影忍者一家
Рет қаралды 36 МЛН
Clown takes blame for missing candy 🍬🤣 #shorts
00:49
Yoeslan
Рет қаралды 49 МЛН
Elon Musk on xAI: We will win | Lex Fridman Podcast
27:01
Lex Clips
Рет қаралды 160 М.
KP Reddy | Shadow Ventures | MultifamilyCollective
57:37
Multifamily Media Network
Рет қаралды 1,2 М.
Prince Harry "CANNOT Have It Both Ways" | Kinsey Schofield Compilation On The Royal Family
37:21
Marvin Minsky
1:33:35
InfiniteHistoryProject MIT
Рет қаралды 803 М.
⚡ Арестович:ПУТИН всегда держит СЛОВО
5:10
военкор Арнольд
Рет қаралды 217 М.
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 20 МЛН