Notes of this video will be uploaded in a short while :)
Пікірлер: 1 200
@couldbenimish3 жыл бұрын
Addition : : Binary Search applicable only when the given array is sorted. If not, we first need to sort the array and then find the element using the binary search function.
@---UNDEMODUGULANIKHILTEJA2 жыл бұрын
Yeah...
@manasmj Жыл бұрын
5:10 pe bola toh hai, addition kis baat ka
@itsprincegaming9 ай бұрын
@@manasmj imp thing ti remember
@itsprincegaming9 ай бұрын
Thanks
@manasgupta66476 ай бұрын
@@manasmjexactly 😅
@CricketLover-kc6ln3 жыл бұрын
Man with the mission 🔥🔥🔥❤️
@jaiveer93063 жыл бұрын
Like Elon musk 👻😉🤣🤣🤣
@CricketLover-kc6ln3 жыл бұрын
@@jaiveer9306 😀😂
@pep82213 жыл бұрын
@@CricketLover-kc6ln Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@pep82213 жыл бұрын
@@CricketLover-kc6ln Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@@ThunderBladeZen Hum har jagah par hai 😁! Ashirwad bhava
@singh_043 жыл бұрын
where is neha search ?
@shreyaschavhan55223 жыл бұрын
@@singh_04 Neha Search - Concept: Sabka Katega Neha Search - Time Complexity: 6 to 12 months Neha Search - Conclusion: ____________! (Fill in the blank)
@manitsaharan59953 жыл бұрын
Bhai ye code glat h chal hi ni mera binary search wala
@shreyaschavhan55223 жыл бұрын
@@manitsaharan5995 Correct hai Bhai! Ek baar phirse dekho kuch mistake ho rahi hogi apse
@RiyaSharma-gm5om3 жыл бұрын
Truly amazing content, I just love this series.
@kpsaini4043 жыл бұрын
Explaining Binary search complexity is awesome. I like it
@sanketkumar093 жыл бұрын
Well done bhaiya We love you and always support you
@pep82213 жыл бұрын
Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@ashisharyan30283 жыл бұрын
@@pep8221 good joke bro .... sharda prestigious h
@pep82213 жыл бұрын
@@ashisharyan3028 yesss very much. Even more prestigious than Harvard.
@ashisharyan30283 жыл бұрын
@@pep8221 lol bhai meri toh fir aukaat hi nhi h.....merese toh 12th pass hi nhi kiya hoga
@pep82213 жыл бұрын
@@ashisharyan3028 koi baat nahi bhai. Agar sharda university me admission nahi hua tho tum koi aur university jaise ki Oxford, Harvard ya Princeton me admission lelena.
@Csharpian.11 ай бұрын
Mam you are really god for us, likes poor and middle class background students Your technique of teaching is just amazing your video makes easy to understand any topics...tqqqq my fav mam
@severemage3374 Жыл бұрын
0:49 linear search 3:30 binary concept 8:00 binary code
@kiranp58283 жыл бұрын
These guys are just amazing.And they were doing such a great work. They were giving a very quality education for free. Please guys support them all.🙏🙏🙏
@tayyabali36042 жыл бұрын
Thank you very much for this DSA course very easy and simple way to learn
@sagarrajkumargupta51682 жыл бұрын
your teaching style is quite good and i want notes of this lecture. i saw previous request for notes But you didn't upload on this video. kindly upload the notes as soon as possible its my humble request to you. Keep Growing.
@astatosiseverywhere3 жыл бұрын
whenever mam say 'thik hai' i feel very good
@oli13463 жыл бұрын
This video is well animated and explained nicely! please follow this order
@SakshiPatil_3 жыл бұрын
Thankyou so much for your efforts ❤️❤️ and urvi di apa bahoot jyada accha sikhate ho please apa hi sikhana ye pura course muze apaka sikhaya jyada accha samajha ata hai . Love you ❤️❤️❤️
@bengaltiger38903 жыл бұрын
Everyone is first until you refresh 😂🔥
@arunmaity4613 жыл бұрын
Han..ekdom😂
@pep82213 жыл бұрын
Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@pep82213 жыл бұрын
@@arunmaity461 Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@arunmaity4613 жыл бұрын
@@pep8221 tum kon hote ho..mera aukad judge karne wala? Aur maine aisa kya comment kiya jisse tum mera aukad estimate karoge?
@arunmaity4613 жыл бұрын
@@pep8221 aur aisi arrogant stupid idiot ki tarah behave mat karo..isse tumhara khud ka hi respect girega dusro ke saamne..tumhare mata pita kya is tarike se tumhe logo ke saath behave karna sikhaya hai?
@tathagataghosh38093 жыл бұрын
Urvi di rocks man!!!🔥🔥🔥❤️
@vishalprajapati12083 жыл бұрын
Bhai madam ka pura name or insta account ho to do na , please 🙏🙏
@21ishansharma823 жыл бұрын
@@vishalprajapati1208 urvi goel!
@priyamondal61773 жыл бұрын
Best video ever. Thank you mentor and Aman dhattarwal for this awesome contribution to the society. More power to all the members of Apna College.
@LifewRoshu2 жыл бұрын
Thank you so much AMAN BHAIYA and the whole team of APNA COLLEGE ❤️❤️✨✨
@aestheticsurdu59752 жыл бұрын
Watching From Pakistan Love this Channel
@devilhunter81203 жыл бұрын
8:52 the value of e = n-1, because the indexing starts from 0.
@jasmeetsinghvirdi773 жыл бұрын
Yes even I noticed the same thing.. Kindly update if we are wrong.
@aryansaxena49783 жыл бұрын
actually it could be either of the values, cuz vese b hamein exact mid point ki zarurat nhi hai. baad m to check krna hi hai ki key midpoint se bada hai ya chota hai.
@hemasingh56683 жыл бұрын
No...I think over here because as s=0 and e=n so when you will do (S+n)/2=(0+n)/2 will give exactly half of your array but if you do(0+n-1)/2 you will not get exactly the mid of the array.please think again.
@aryansaxena49783 жыл бұрын
@@hemasingh5668 yeah that is true but there is really no need to find out the exact mid point ryt? Lets assume array 6 size ki hai. (0+n)/2 krte ho to mid point 3 index p ata hai. (0+n-1)/2 se mid point 2 index ata h. And in either of the cases u ll be checking whether your target element is before that index or after that index. N time complexity is also the same in both cases. So the answer ll be d same either way.
@harshvardhankushwaha30003 жыл бұрын
gives same result either
@shubhambhardwaj88943 жыл бұрын
Awesome lecture, thanks ma'am❤😊
@dipanshi15882 жыл бұрын
0:47 agar nahi milega to minus 1 kyu karna hai return..?
@aryansharma-wf8sn3 жыл бұрын
Urvi di aap hi baki lectures bhi lena you explain these concepts very easily 🤩😍
@SUJOYPAULJOBS3 жыл бұрын
linear and binary search bohot easy ....and MAM EASY TO TEACH C++...NICE
@CyberrBoss3 жыл бұрын
Your pace and voice is so good, it helps to get understand the concept very easily. Thanks
@rutvikrana5123 жыл бұрын
This approach of problem solving is called "divide and conquer". As we are dividing our array into halves. Another examples of D&C : - finding GCM ( greatest common divisor ) - merge sort and quick sort algorithms binary search will only work if array is sorted. This should be in mind. The same example of the video can be easily written by Recursion. binarySearch(int arr[],int item,int l, int r) { int n = sizeof(arr)/sizeof(arr[0]); int m = (l+r)/2; if (m < 0 || m> n-1){ return -1; } if (arr[m] == item){ return item; } else if(arr[m] > item) { return binarySearch(arr,item,l,m-1); } else{ return binarySearch(arr,item,m+1,r); } return -1; }
@kushagra03473 жыл бұрын
What is l and r representing?
@fundekaustubh3 жыл бұрын
@@kushagra0347 l represents the left-most index of the half that is to be searched and r represents the right-most index of the half that is to be searched. Initially while calling the function, l is 0 and r is n-1.
@kushagra03473 жыл бұрын
@@fundekaustubh Thanks Mate💯🙌🏻
@be_calm23723 жыл бұрын
Good ❤️
@sohanjangid12073 жыл бұрын
@@fundekaustubh can we assign first array index as '1' or it is necessary to assign it '0'. Here she use n but that mean that she is assigning first value as 1.
@rajgupta65213 жыл бұрын
After k iteration ,length of array=n/2^k-1 As In 1st iteration length =n/2^0 In 2nd iteration length =n/2^1 So In k iteration length =n/2^k-1 It is simple gm series
@tulsidas29083 жыл бұрын
Exactly
@chiragsharma53873 жыл бұрын
1st iteration ke baad n/2 hoga kyuki phli baar jab function run hoga to (s + e)/2 se run hoga, so kth iteration n/2^k hoga
@sagardas29242 жыл бұрын
Yess! Toh pehle n hi hain array size. First iteration ke baad n/(2^1) and so on!
@aryankhandelwal153 жыл бұрын
superb🔥🔥it is indeed best course
@PrithaMajumder Жыл бұрын
Thank You So Much Apna College for this amazing lecture 😊
@mukundkumar34003 жыл бұрын
I always forget about hitting the like button nevertheless I love this series
@361-shashankgupta32 жыл бұрын
Binary Search works in sorted array only. We have to sort the array first in ascending or descending order if the array entered in unsorted . Linear Search is better for unsorted array
@Samconery Жыл бұрын
why is that the end point is n and not n-1 when we keep the start point as 0?
@amanjaiswal48473 жыл бұрын
one thing i want to add: mere jese slow learner ko jab koi kuch concept samjhaye or fir programme likhne k baad usi chiz ko dubara samjhaye pura no words for this thank you so much
@mr.techoorienter3 жыл бұрын
Aman bhaiya = indian elon musk in education..❤️🔥🔥🔥
@prathitprasad2 жыл бұрын
I use Java but still this explanation was too helpful Btw no Nehas were harmed while making this video
@nainika.s65723 жыл бұрын
Well done bhaiyah you are the best and your whole team is also best
@rajeshjha68013 жыл бұрын
Bandhubud aur budbak me apna school tha AUR yaha pe apna college😍❤❤
@pep82213 жыл бұрын
Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@me-oniichan3 жыл бұрын
@@pep8221 kahi bhi kuch bhi likh rha hai kya tu
@puneetchhabra25783 жыл бұрын
@@me-oniichan ye spam krra h pgl
@rajeshjha68013 жыл бұрын
@@puneetchhabra2578 haan
@GURU-lz1iw3 жыл бұрын
dd, ek baar dekhna... doubt tha... time complexity of binary search mein... after 3 interation length of array is n/2^3-1... so after k interation it should be n/2^k-1... so after calculation time complexity should be log2n with base 2...plz clear the doubt.... btw thanks for the course to every member... lots of love❤❤❤❤
@xpt5oo1862 жыл бұрын
base is ignored while calculating complexity as log base 2 is same log base e / log base 2 and we ignore the coefficients of terms. Here log base 2 is ignored.
@K-EC-AmanKumar2 жыл бұрын
constant to be ignored so K = log n + 1 would be same as K =log n
@talkwithrd56973 жыл бұрын
Great... Kisi ne itna easily nai samjhaya Thank @apnacollege
@haseeburrehman42122 жыл бұрын
Your teaching style and voice is quite good.
@priyanshuadhikary89153 жыл бұрын
There is one mistake in last time complexity that after K iterations ,the length of the array becomes = n/2^(k-1)........(12:17)... I hope , I am right since you are a wonderful teacher and because of you I can find the mistake and can correct it.....
@jatinkumar-bd2nw3 жыл бұрын
You are right brother
@bdbrightdiamond3 жыл бұрын
No the mistake is at first line, after first iteration length of the array becomes n/2 and not n
@snehilsinha46893 жыл бұрын
there's no mistake at all. The array size starts from n and after the iterations start, it becomes n/2, n/3, n/4... n/2^k. Note here that k is a random number and not according to the pattern you are thinking which makes it (k-1). Let's say (k-1)=k'. In the video k' is the k. You can co relate this with principal of mathematical induction where we assume the expression to be true for any random k and not some k as per some pattern. And for those who are saying after first iteration array size should be n/2, that's true but the point is that we have to consider from the point before the iteration starts for calculation of time complexity in which case the size wil be n itself. So apparently there's absolutely no mistake in the video.
@SudeepJoshi223 жыл бұрын
@@bdbrightdiamond That's Correct...👍👍👍👍👍👍👍
@prashantdeveloper73543 жыл бұрын
@@snehilsinha4689 you r right... But it should be n/2,n/4,n/8....
@EverythingaboutTechPro3 жыл бұрын
The time complexity of Binary search is not really O(logn ) because the array was not sorted . SO if i have to sort the array as well using Merge Sort then the time complexity becomes O(logn + nlogn) = O(logn) ... So if it's unsorted then time complexity is O(nlogn) .
@shivammishra97332 жыл бұрын
This is a best course of C++ and DSA
@ItsYourCandyBro3 жыл бұрын
These videos are really "awesome"
@excalibur28893 жыл бұрын
Didi afer kth iteration shouldn't it be n/(2^k-1)
@nimisharaj85013 жыл бұрын
yeah..i too had the same doubt..
@ibrahimwadi65393 жыл бұрын
@@nimisharaj8501 same here
@akshansharma35273 жыл бұрын
after the first iteration, it will be n/2. it will be n before that. so the formula is n/(2^iterations)
@ravishukla74932 жыл бұрын
After K iteration, the length of the array should be n/2^k-1
@nikunjgaming95902 жыл бұрын
Yes
@techeduidea25982 жыл бұрын
Yes
@rameshmalhotra95252 жыл бұрын
kzbin.info/www/bejne/a3fWepRqgtVmntE
@ayushdey65032 жыл бұрын
Same doubt
@gagaguguu Жыл бұрын
It doesn't matter. Its like subtracting infinity by 1 So infinity - 1 = infinity So N/2^k-1 = N/2^k Because N is dominant and can be value equal to infinity
@abhijeetdhumal86502 жыл бұрын
I think we need to write while loop like while(s
@barfy.man36243 жыл бұрын
Kya mast Kam krte ho maksood bhai
@VikasSingh-pw5iz3 жыл бұрын
Are ye didi konsi h, she explains really well. Thanks for the efforts
@subhamrudra3603 жыл бұрын
Sir, it has been 8 months now, please upload the notes of this video. 😃
@yashmodi2432 Жыл бұрын
it has been 1 year 8 months please upload notes😂
@unkownboy9962 Жыл бұрын
@@yashmodi2432 it has been 2 year please upload notes
@syedmuhammadabdullah3777 Жыл бұрын
🤣
@brucewayne-mh7ul3 жыл бұрын
Gazab animation bhai 😁
@hspianozone13373 жыл бұрын
Sab samaj aa gaya now I am confident about c++
@saudaminisahu90602 жыл бұрын
@Apna college The length of array after k iterations would be n/2 power(k-1) (in the concept of finding time complexity of binary search)
@adityadeepak56863 жыл бұрын
didi saying "thik hai" is op !!!
@anubhabsamanta85323 жыл бұрын
Bhaisaab Kya samjha diya Neha rocks
@shivammaurya34513 жыл бұрын
Thank u aman bhaiya and mam very useful video thank u ❤🖤
@ishitabisaria64373 жыл бұрын
Sir notes??
@kunalakriti8 күн бұрын
pata nhi
@tejasvitarone55862 жыл бұрын
Very Important condition for Binary search is that Array should be sorted But in your code there aren't any lines which shows that.if before searching we code for it then it will be better for unsorted input array also.
@nishant98472 жыл бұрын
hnn we can write a seperate function for that
@MtlbKuchBhi1212 жыл бұрын
Because she already has taken sorted array from user.
@Hot-Introduction3 жыл бұрын
Aman Bhaiya and team you are great
@amanarora81713 жыл бұрын
Worth it!
@beacoder12213 жыл бұрын
Sir Please upload the notes it is going to be 1 week of this video being uploaded
@weasleygaming33 жыл бұрын
Can you please tell at 5:57, it isn't necessary that the user inputs the elements of array in ascending, so how can we solve it then?
@TonyStark-ct8xd3 жыл бұрын
@@weasleygaming3 use c/c++ built in sort( ) function.
@0xatul3 жыл бұрын
@@weasleygaming3 Yes, It's necessar to have the inputs in ascending order, thats why it is called binary search. There are other algorithms for searching without a ascending order.
@cenacr0073 жыл бұрын
u can sort it beforehand....sort function is available for that
@AbhishekSharma-wi2ry3 жыл бұрын
@@TonyStark-ct8xd by after sorting the array index of the elements will change then how would we get correct index It will index of the sorted array but we want index of the real array that's my doubt
@hifzahabid85542 жыл бұрын
you way of explaining things is awesome but just try to explain even more deeper because we are beginners
@unkownboy9962 Жыл бұрын
🙂han na aksar cheezay uper sy he guzer jati hai
@tusharjolly27343 жыл бұрын
too good yaar seriously...
@AbhishekKumar-td5zu3 жыл бұрын
Tqsm bhaiya ♥️♥️
@sohamDevRel3 жыл бұрын
When would the notes be uploaded?
@somnathduttabanik50483 жыл бұрын
please upload the notes... thank you for the lecture series
@piyushthakur38962 жыл бұрын
its is just amazing
@danishsheikh58083 жыл бұрын
Very Useful I Liked
@vaibhavkapoor39533 жыл бұрын
Pls upload notes of this video it’s been 3 months now🙏🏼
@akshatavasthi28803 жыл бұрын
soory bro ..... short while( n
@mauryaashish18653 жыл бұрын
now its 7 months :(
@aditijha74383 жыл бұрын
@@shubhsharma19 everyone is not quick in grasping so u should respect it!
@ayushjhanwar36963 жыл бұрын
@@mauryaashish1865 8 months ;(
@sandhyashivhare29552 жыл бұрын
10 months
@mrp34433 жыл бұрын
Please also make a video on logarithm. And also this course is just fantastic
@parasmoharle Жыл бұрын
Bro if u dont know anything about log just learn basic or mid and then come back same for derivation and integration
@SauravKumar-yo8hb3 жыл бұрын
great content
@vipulgupta68243 жыл бұрын
it helped me a lot
@jatingarg18973 жыл бұрын
Sir please provide the notes of this lecture sir. Thankyou. And your course is amazing.
@rakeshpatra7800 Жыл бұрын
Re ghanta amazing vai sala wise parata hai jaise ki aj hi khatam karna hai pura syllabus ☹️ thoda smjha samjha ka padya na College mai vi eisa padata hai or yeh vu dise padata hai 😑kahase samjhe patahi nahi chalta hai
@jatingarg1897 Жыл бұрын
@@rakeshpatra7800 Check the time of my comment. Its more than 1 year now. Ab isse kahi guna behtr courses youtube pe hai.
@mihirmakwana11413 жыл бұрын
Sir please upload notes of this video.
@chandansuthar64472 жыл бұрын
Awesome teaching didi🤗
@maledasci-tech6 ай бұрын
O thank you very much
@alimemon30543 жыл бұрын
Bhaiya Everyday I am waiting for you to upload the video...Bhaiya the link in the notes of last video is not opening
@rakeshkumar0153 жыл бұрын
12:11 --After k iteration,i think length of array becomes n/2^(k-1)🙄🙄🙄
@bharatsinghrawat45363 жыл бұрын
true
@rounaksinghbuttar90833 жыл бұрын
I was specifically searching for this correction
@kamalchakravarathyrachakon99713 жыл бұрын
Yeah..you're right.
@janvimyadventures13102 жыл бұрын
There was some mistakes 1-n/2 2-(n/2)/2=n/2^2 3-(n/2^2)/2=n/2^3 . K-(n/2^k)
@janvimyadventures13102 жыл бұрын
Actually 1 was taken wrong
@user-yi1wy4xs9v6 ай бұрын
Great 👍
@ehsanullah42067 ай бұрын
Very easy teaching method thanks maam
@dexhorox7394 Жыл бұрын
You forgot to mention one thing though while linear search can be used on unsorted data,binary search can only be used on sorted data
@vidhutripathi48713 жыл бұрын
end should be set as n-1 since we have 0 based indexing in c++
@sayanghosh69963 жыл бұрын
yes
@vedantshah42303 жыл бұрын
Yes
@sohanjangid12073 жыл бұрын
Yes bro I have same doubt . Have you solved it?
@sayanghosh69963 жыл бұрын
@@sohanjangid1207 theres no doubt, it will be n-1.
@pranjalpagaria3223 жыл бұрын
thats why they have not run the code
@StatusPlus_13 жыл бұрын
great work
@me__piyush3 жыл бұрын
Thankyou 🙏
@srijankunduchowdhury2 жыл бұрын
After 1st iteration, length of array should be n/2 .. That's why we can conclude, After k iteration, lengh of array would be n/(2**k)
@harshitasinghdulawat79566 ай бұрын
she has done wrong! ,right?
@last_countr_3 жыл бұрын
Level of explanation aag aag aag 🙏
@SonalDhani3 жыл бұрын
Konse angle se
@last_countr_3 жыл бұрын
@@SonalDhani animation ke angle se🤣🤣🤣🤣
@fahadsUniverse2 жыл бұрын
Subscribed😇...
@anujsaini44543 жыл бұрын
Didi you are amazing 😘😘
@dm014173 жыл бұрын
That "Theek Hai" hits on another level also kya awesome bandi ha yrr as in your voice is very sweat. Buddy Loved the way you teach xD xD !!
@hey_utkarshh3 жыл бұрын
Please tell difference between iterative and recursive , as for the binary search
@qwerty688 Жыл бұрын
Google it
@harshitmehra6712 жыл бұрын
Gr8 ✨
@AryanSingh-xx8lc Жыл бұрын
Ma'am ki awaz se pyaar ho gya
@sounaksaha14553 жыл бұрын
Please, bhaiya upload the notes ASAP. We are counting on you
@AryanKohli-hkscx3 жыл бұрын
12:11 it should be n/(2^(k-1))
@Kshitish_th3 жыл бұрын
Yp i was thinking sane
@atharvpatharkar16522 жыл бұрын
Thank you 🙏🏻
@jarjarbinks99372 жыл бұрын
unlike C, in C++ by default for every user input the line control shifts to the next line, unless it is an array and inline and equally spaced inputs can be taken.
@shashankrana18072 жыл бұрын
now we have 3 different ways of denoting an array: while in function-array[], while declaring array[n] and while calling in linearSearch- just array. What is logic behind this? Why dont we need to specify size of array while declaring
@shubhpreetkaur91432 жыл бұрын
ya same doubt
@ashishnandan86102 жыл бұрын
Please upload the notes.
@harshulagarwal17553 жыл бұрын
Bhaiya ads daal dete vids mein. Kam se kam kuch support toh milta hamaari taraf se. Thank you so much for this course 🙏🙏👍👍
@vengersquad89122 жыл бұрын
It helped me a lot for my boards exam of computer
@TheZipzapzum3 жыл бұрын
Yes , neha is back !
@vijaypunera73993 жыл бұрын
It's been 2 months , we haven't got notes of this lecture.
@rishisingh75273 жыл бұрын
@ADITYA PRATAP SINGH TOMAR no notes needed if u know the algorthim
@pgraju11252 жыл бұрын
Its been 1yr now
@deepsahil__10 ай бұрын
It's 2 years now 😂
@vedantnaikwadi413010 ай бұрын
@@deepsahil__😂😂
@vijaypunera739910 ай бұрын
@@deepsahil__ don't study if you are newbie from them these lectures are for those who know these things already