8.2 Searching in Arrays | Linear and Binary Search | C++ Placement Course |

  Рет қаралды 1,108,637

Apna College

Apna College

Күн бұрын

Пікірлер
@shreyaschavhan5522
@shreyaschavhan5522 4 жыл бұрын
Notes - Linear Search - {Time Complexity - O(n)} - 0:49 Binary Search - Concept - 3:30 Binary Search - Code - 8:00 Binary Search - Time Complexity - O(logn base 2) - 11:32
@shreyaschavhan5522
@shreyaschavhan5522 3 жыл бұрын
@@ThunderBladeZen Hum har jagah par hai 😁! Ashirwad bhava
@singh_04
@singh_04 3 жыл бұрын
where is neha search ?
@shreyaschavhan5522
@shreyaschavhan5522 3 жыл бұрын
@@singh_04 Neha Search - Concept: Sabka Katega Neha Search - Time Complexity: 6 to 12 months Neha Search - Conclusion: ____________! (Fill in the blank)
@manitsaharan5995
@manitsaharan5995 3 жыл бұрын
Bhai ye code glat h chal hi ni mera binary search wala
@shreyaschavhan5522
@shreyaschavhan5522 3 жыл бұрын
@@manitsaharan5995 Correct hai Bhai! Ek baar phirse dekho kuch mistake ho rahi hogi apse
@amanjaiswal4847
@amanjaiswal4847 3 жыл бұрын
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
@sanketkumar09
@sanketkumar09 4 жыл бұрын
Well done bhaiya We love you and always support you
@pep8221
@pep8221 4 жыл бұрын
Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@ashisharyan3028
@ashisharyan3028 4 жыл бұрын
@@pep8221 good joke bro .... sharda prestigious h
@pep8221
@pep8221 4 жыл бұрын
@@ashisharyan3028 yesss very much. Even more prestigious than Harvard.
@ashisharyan3028
@ashisharyan3028 4 жыл бұрын
@@pep8221 lol bhai meri toh fir aukaat hi nhi h.....merese toh 12th pass hi nhi kiya hoga
@pep8221
@pep8221 4 жыл бұрын
@@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.
@kiranp5828
@kiranp5828 4 жыл бұрын
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.🙏🙏🙏
@CSSqlJq
@CSSqlJq Жыл бұрын
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
@kpsaini404
@kpsaini404 3 жыл бұрын
Explaining Binary search complexity is awesome. I like it
@astatosiseverywhere
@astatosiseverywhere 3 жыл бұрын
whenever mam say 'thik hai' i feel very good
@severemage3374
@severemage3374 2 жыл бұрын
0:49 linear search 3:30 binary concept 8:00 binary code
@CricketLover-kc6ln
@CricketLover-kc6ln 4 жыл бұрын
Man with the mission 🔥🔥🔥❤️
@jaiveer9306
@jaiveer9306 4 жыл бұрын
Like Elon musk 👻😉🤣🤣🤣
@CricketLover-kc6ln
@CricketLover-kc6ln 4 жыл бұрын
@@jaiveer9306 😀😂
@pep8221
@pep8221 4 жыл бұрын
@@CricketLover-kc6ln Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@pep8221
@pep8221 4 жыл бұрын
@@CricketLover-kc6ln Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@Shubham-rv5cm
@Shubham-rv5cm 4 жыл бұрын
Man on mission
@sagarrajkumargupta5168
@sagarrajkumargupta5168 3 жыл бұрын
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.
@priyamondal6177
@priyamondal6177 4 жыл бұрын
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.
@SakshiPatil_
@SakshiPatil_ 4 жыл бұрын
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 ❤️❤️❤️
@LifewRoshu
@LifewRoshu 3 жыл бұрын
Thank you so much AMAN BHAIYA and the whole team of APNA COLLEGE ❤️❤️✨✨
@aestheticsurdu5975
@aestheticsurdu5975 3 жыл бұрын
Watching From Pakistan Love this Channel
@aryansharma-wf8sn
@aryansharma-wf8sn 4 жыл бұрын
Urvi di aap hi baki lectures bhi lena you explain these concepts very easily 🤩😍
@RiyaSharma-gm5om
@RiyaSharma-gm5om 4 жыл бұрын
Truly amazing content, I just love this series.
@CyberrBoss
@CyberrBoss 3 жыл бұрын
Your pace and voice is so good, it helps to get understand the concept very easily. Thanks
@tathagata_ghosh_14
@tathagata_ghosh_14 4 жыл бұрын
Urvi di rocks man!!!🔥🔥🔥❤️
@vishalprajapati1208
@vishalprajapati1208 4 жыл бұрын
Bhai madam ka pura name or insta account ho to do na , please 🙏🙏
@21ishansharma82
@21ishansharma82 3 жыл бұрын
@@vishalprajapati1208 urvi goel!
@SUJOYPAULJOBS
@SUJOYPAULJOBS 4 жыл бұрын
linear and binary search bohot easy ....and MAM EASY TO TEACH C++...NICE
@GURU-lz1iw
@GURU-lz1iw 3 жыл бұрын
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❤❤❤❤
@xpt5oo186
@xpt5oo186 2 жыл бұрын
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-AmanKumar
@K-EC-AmanKumar 2 жыл бұрын
constant to be ignored so K = log n + 1 would be same as K =log n
@bengaltiger3890
@bengaltiger3890 4 жыл бұрын
Everyone is first until you refresh 😂🔥
@arunmaity461
@arunmaity461 4 жыл бұрын
Han..ekdom😂
@pep8221
@pep8221 4 жыл бұрын
Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@pep8221
@pep8221 4 жыл бұрын
@@arunmaity461 Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@arunmaity461
@arunmaity461 4 жыл бұрын
@@pep8221 tum kon hote ho..mera aukad judge karne wala? Aur maine aisa kya comment kiya jisse tum mera aukad estimate karoge?
@arunmaity461
@arunmaity461 4 жыл бұрын
@@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?
@devilhunter8120
@devilhunter8120 4 жыл бұрын
8:52 the value of e = n-1, because the indexing starts from 0.
@jasmeetsinghvirdi77
@jasmeetsinghvirdi77 4 жыл бұрын
Yes even I noticed the same thing.. Kindly update if we are wrong.
@aryansaxena4978
@aryansaxena4978 4 жыл бұрын
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.
@hemasingh5668
@hemasingh5668 4 жыл бұрын
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.
@aryansaxena4978
@aryansaxena4978 4 жыл бұрын
@@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.
@harshvardhankushwaha3000
@harshvardhankushwaha3000 3 жыл бұрын
gives same result either
@atomicity.probably
@atomicity.probably 2 ай бұрын
It's sooo much simpler than I had thought, thanks!
@oli1346
@oli1346 4 жыл бұрын
This video is well animated and explained nicely! please follow this order
@rutvikrana512
@rutvikrana512 4 жыл бұрын
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; }
@kushagra0347
@kushagra0347 4 жыл бұрын
What is l and r representing?
@fundekaustubh
@fundekaustubh 4 жыл бұрын
@@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.
@kushagra0347
@kushagra0347 4 жыл бұрын
@@fundekaustubh Thanks Mate💯🙌🏻
@be_calm2372
@be_calm2372 4 жыл бұрын
Good ❤️
@sohanjangid1207
@sohanjangid1207 4 жыл бұрын
@@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.
@mukundkumar3400
@mukundkumar3400 3 жыл бұрын
I always forget about hitting the like button nevertheless I love this series
@HamadKhan-k5x
@HamadKhan-k5x 2 ай бұрын
loved your easy method of teaching,,,,very nice
@priyanshuadhikary8915
@priyanshuadhikary8915 4 жыл бұрын
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-bd2nw
@jatinkumar-bd2nw 4 жыл бұрын
You are right brother
@bdbrightdiamond
@bdbrightdiamond 4 жыл бұрын
No the mistake is at first line, after first iteration length of the array becomes n/2 and not n
@snehilsinha4689
@snehilsinha4689 4 жыл бұрын
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.
@SudeepJoshi22
@SudeepJoshi22 4 жыл бұрын
@@bdbrightdiamond That's Correct...👍👍👍👍👍👍👍
@prashantdeveloper7354
@prashantdeveloper7354 4 жыл бұрын
@@snehilsinha4689 you r right... But it should be n/2,n/4,n/8....
@talkwithrd5697
@talkwithrd5697 4 жыл бұрын
Great... Kisi ne itna easily nai samjhaya Thank @apnacollege
@361-shashankgupta3
@361-shashankgupta3 3 жыл бұрын
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
@Samconery 2 жыл бұрын
why is that the end point is n and not n-1 when we keep the start point as 0?
@barfy.man3624
@barfy.man3624 4 жыл бұрын
Kya mast Kam krte ho maksood bhai
@rajgupta6521
@rajgupta6521 4 жыл бұрын
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
@tulsidas2908
@tulsidas2908 4 жыл бұрын
Exactly
@chiragsharma5387
@chiragsharma5387 3 жыл бұрын
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
@sagardas2924
@sagardas2924 3 жыл бұрын
Yess! Toh pehle n hi hain array size. First iteration ke baad n/(2^1) and so on!
@mehaseeburrehman
@mehaseeburrehman 2 жыл бұрын
Your teaching style and voice is quite good.
@tayyabali3604
@tayyabali3604 2 жыл бұрын
Thank you very much for this DSA course very easy and simple way to learn
@prathitprasad
@prathitprasad 3 жыл бұрын
I use Java but still this explanation was too helpful Btw no Nehas were harmed while making this video
@couldbenimish
@couldbenimish 4 жыл бұрын
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.
@---UNDEMODUGULANIKHILTEJA
@---UNDEMODUGULANIKHILTEJA 3 жыл бұрын
Yeah...
@manasmj
@manasmj Жыл бұрын
5:10 pe bola toh hai, addition kis baat ka
@itsprincegaming
@itsprincegaming Жыл бұрын
@@manasmj imp thing ti remember
@itsprincegaming
@itsprincegaming Жыл бұрын
Thanks
@manasgupta6647
@manasgupta6647 Жыл бұрын
​@@manasmjexactly 😅
@mr.techoorienter
@mr.techoorienter 3 жыл бұрын
Aman bhaiya = indian elon musk in education..❤️🔥🔥🔥
@hifzahabid8554
@hifzahabid8554 3 жыл бұрын
you way of explaining things is awesome but just try to explain even more deeper because we are beginners
@unkownboy9962
@unkownboy9962 2 жыл бұрын
🙂han na aksar cheezay uper sy he guzer jati hai
@PrithaMajumder
@PrithaMajumder Жыл бұрын
Thank You So Much Apna College for this amazing lecture 😊
@rajeshjha6801
@rajeshjha6801 4 жыл бұрын
Bandhubud aur budbak me apna school tha AUR yaha pe apna college😍❤❤
@pep8221
@pep8221 4 жыл бұрын
Tera aukat bhi nahi h Sharda jaise prestigious university me admission lene ka
@me-oniichan
@me-oniichan 4 жыл бұрын
@@pep8221 kahi bhi kuch bhi likh rha hai kya tu
@puneetchhabra2578
@puneetchhabra2578 4 жыл бұрын
@@me-oniichan ye spam krra h pgl
@rajeshjha6801
@rajeshjha6801 4 жыл бұрын
@@puneetchhabra2578 haan
@shivammishra9733
@shivammishra9733 3 жыл бұрын
This is a best course of C++ and DSA
@shubhambhardwaj8894
@shubhambhardwaj8894 4 жыл бұрын
Awesome lecture, thanks ma'am❤😊
@dipanshi1588
@dipanshi1588 3 жыл бұрын
0:47 agar nahi milega to minus 1 kyu karna hai return..?
@harshulagarwal1755
@harshulagarwal1755 4 жыл бұрын
Bhaiya ads daal dete vids mein. Kam se kam kuch support toh milta hamaari taraf se. Thank you so much for this course 🙏🙏👍👍
@adityadeepak5686
@adityadeepak5686 4 жыл бұрын
didi saying "thik hai" is op !!!
@nainika.s6572
@nainika.s6572 4 жыл бұрын
Well done bhaiyah you are the best and your whole team is also best
@last_countr_
@last_countr_ 4 жыл бұрын
Level of explanation aag aag aag 🙏
@SonalDhani
@SonalDhani 4 жыл бұрын
Konse angle se
@last_countr_
@last_countr_ 4 жыл бұрын
@@SonalDhani animation ke angle se🤣🤣🤣🤣
@brucewayne-mh7ul
@brucewayne-mh7ul 3 жыл бұрын
Gazab animation bhai 😁
@VikasSingh-pw5iz
@VikasSingh-pw5iz 4 жыл бұрын
Are ye didi konsi h, she explains really well. Thanks for the efforts
@AryanSingh-xx8lc
@AryanSingh-xx8lc 2 жыл бұрын
Ma'am ki awaz se pyaar ho gya
@GeshuLin_WW
@GeshuLin_WW 3 жыл бұрын
After K iteration, the length of the array should be n/2^k-1
@nikunjgaming9590
@nikunjgaming9590 3 жыл бұрын
Yes
@techeduidea2598
@techeduidea2598 3 жыл бұрын
Yes
@rameshmalhotra9525
@rameshmalhotra9525 3 жыл бұрын
kzbin.info/www/bejne/a3fWepRqgtVmntE
@ayushdey6503
@ayushdey6503 2 жыл бұрын
Same doubt
@gagaguguu
@gagaguguu 2 жыл бұрын
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
@tejasvitarone5586
@tejasvitarone5586 3 жыл бұрын
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.
@nishant9847
@nishant9847 2 жыл бұрын
hnn we can write a seperate function for that
@MtlbKuchBhi121
@MtlbKuchBhi121 2 жыл бұрын
Because she already has taken sorted array from user.
@hspianozone1337
@hspianozone1337 4 жыл бұрын
Sab samaj aa gaya now I am confident about c++
@kunal1898
@kunal1898 4 жыл бұрын
Shraddha Di.. you rock🔥
@ehsanullah4206
@ehsanullah4206 Жыл бұрын
Very easy teaching method thanks maam
@vidhutripathi4871
@vidhutripathi4871 4 жыл бұрын
end should be set as n-1 since we have 0 based indexing in c++
@sayanghosh6996
@sayanghosh6996 4 жыл бұрын
yes
@vedantshah4230
@vedantshah4230 4 жыл бұрын
Yes
@sohanjangid1207
@sohanjangid1207 4 жыл бұрын
Yes bro I have same doubt . Have you solved it?
@sayanghosh6996
@sayanghosh6996 4 жыл бұрын
@@sohanjangid1207 theres no doubt, it will be n-1.
@pranjalpagaria322
@pranjalpagaria322 4 жыл бұрын
thats why they have not run the code
@shivammaurya3451
@shivammaurya3451 4 жыл бұрын
Thank u aman bhaiya and mam very useful video thank u ❤🖤
@beacoder1221
@beacoder1221 4 жыл бұрын
Sir Please upload the notes it is going to be 1 week of this video being uploaded
@weasleygaming3
@weasleygaming3 4 жыл бұрын
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-ct8xd
@TonyStark-ct8xd 4 жыл бұрын
@@weasleygaming3 use c/c++ built in sort( ) function.
@0xatul
@0xatul 4 жыл бұрын
@@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.
@cenacr007
@cenacr007 4 жыл бұрын
u can sort it beforehand....sort function is available for that
@AbhishekSharma-wi2ry
@AbhishekSharma-wi2ry 3 жыл бұрын
@@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
@Hot-Introduction
@Hot-Introduction 4 жыл бұрын
Aman Bhaiya and team you are great
@rutvikrana512
@rutvikrana512 4 жыл бұрын
Why use binary search?? Simple answer: If n will become very large then simple search will take hours to find element, but same with binarysearch becomes log(n) ( aka in seconds ... ) 👌
@me-oniichan
@me-oniichan 4 жыл бұрын
Not hours
@_rahulsain
@_rahulsain 4 жыл бұрын
there are advance sort also
@MintuKumar-dn4gq
@MintuKumar-dn4gq 4 жыл бұрын
because of time complexity.
@rutvikrana512
@rutvikrana512 4 жыл бұрын
ALLEN A ... I am talking about n as big as billions. If we theoretically calculate it will take hours or days. 🤘
@rutvikrana512
@rutvikrana512 4 жыл бұрын
Rahul Sain .... what is that I don’t know ? Sort or Search ??
@kritikamishra5023
@kritikamishra5023 7 ай бұрын
just loved the explanation
@r1sh149
@r1sh149 4 жыл бұрын
I think you all will hate me after this comment but 1.Everyone in comment section: This guy will ruin this system The world ia going to change But no one have any doubt 🙄 I had too many doubts and i commented in videos but that comment got ignored and this 🔥 appreciation only getting likes
@mohammedziyad175
@mohammedziyad175 4 жыл бұрын
True brother..i feel like this course is way too fast for begineers!
@rahul_siloniya
@rahul_siloniya 4 жыл бұрын
Bro you need stack exchange not comment section KZbin is for knowledge distribution not for doubt clearance sessions because it's mechanism is not built for this
@techega7632
@techega7632 4 жыл бұрын
@code with sumit 0.1 tm to le bitoge bhai sbka
@kalpeshmali1476
@kalpeshmali1476 4 жыл бұрын
Solving ur own doubts by own makes u a real problem solver if u have any douts just google it or search on stack overflow youtube is for knowledge for doubts stack overflow is there
@techega7632
@techega7632 4 жыл бұрын
@@kalpeshmali1476 Right bro
@Monikakumawat-k4v
@Monikakumawat-k4v Жыл бұрын
It is very easy for me😊
@jatingarg1897
@jatingarg1897 4 жыл бұрын
Sir please provide the notes of this lecture sir. Thankyou. And your course is amazing.
@rakeshpatra7800
@rakeshpatra7800 2 жыл бұрын
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
@jatingarg1897 2 жыл бұрын
@@rakeshpatra7800 Check the time of my comment. Its more than 1 year now. Ab isse kahi guna behtr courses youtube pe hai.
@chandansuthar6447
@chandansuthar6447 3 жыл бұрын
Awesome teaching didi🤗
@excalibur2889
@excalibur2889 4 жыл бұрын
Didi afer kth iteration shouldn't it be n/(2^k-1)
@nimisharaj8501
@nimisharaj8501 4 жыл бұрын
yeah..i too had the same doubt..
@ibrahimwadi6539
@ibrahimwadi6539 4 жыл бұрын
@@nimisharaj8501 same here
@akshansharma3527
@akshansharma3527 4 жыл бұрын
after the first iteration, it will be n/2. it will be n before that. so the formula is n/(2^iterations)
@anubhabsamanta8532
@anubhabsamanta8532 4 жыл бұрын
Bhaisaab Kya samjha diya Neha rocks
@EverythingaboutTechPro
@EverythingaboutTechPro 4 жыл бұрын
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) .
@vengersquad8912
@vengersquad8912 2 жыл бұрын
It helped me a lot for my boards exam of computer
@rakeshkumar015
@rakeshkumar015 4 жыл бұрын
12:11 --After k iteration,i think length of array becomes n/2^(k-1)🙄🙄🙄
@bharatsinghrawat4536
@bharatsinghrawat4536 3 жыл бұрын
true
@rounaksinghbuttar9083
@rounaksinghbuttar9083 3 жыл бұрын
I was specifically searching for this correction
@kamalchakravarathyrachakon9971
@kamalchakravarathyrachakon9971 3 жыл бұрын
Yeah..you're right.
@janvimyadventures1310
@janvimyadventures1310 3 жыл бұрын
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)
@janvimyadventures1310
@janvimyadventures1310 3 жыл бұрын
Actually 1 was taken wrong
@fahadsUniverse
@fahadsUniverse 3 жыл бұрын
Subscribed😇...
@saudaminisahu9060
@saudaminisahu9060 2 жыл бұрын
@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)
@ManognaThota
@ManognaThota 4 ай бұрын
i think iteration starts from 0
@ItsYourCandyBro
@ItsYourCandyBro 3 жыл бұрын
These videos are really "awesome"
@subhamrudra360
@subhamrudra360 3 жыл бұрын
Sir, it has been 8 months now, please upload the notes of this video. 😃
@yashmodi2432
@yashmodi2432 2 жыл бұрын
it has been 1 year 8 months please upload notes😂
@unkownboy9962
@unkownboy9962 2 жыл бұрын
@@yashmodi2432 it has been 2 year please upload notes
@syedmuhammadabdullah3777
@syedmuhammadabdullah3777 2 жыл бұрын
🤣
@DevsMovies-w3f
@DevsMovies-w3f 6 ай бұрын
3 years
@danishsheikh5808
@danishsheikh5808 4 жыл бұрын
Very Useful I Liked
@vaibhavkapoor3953
@vaibhavkapoor3953 4 жыл бұрын
Pls upload notes of this video it’s been 3 months now🙏🏼
@akshatavasthi2880
@akshatavasthi2880 3 жыл бұрын
soory bro ..... short while( n
@mauryaashish1865
@mauryaashish1865 3 жыл бұрын
now its 7 months :(
@aditijha7438
@aditijha7438 3 жыл бұрын
@@shubhsharma19 everyone is not quick in grasping so u should respect it!
@ayushjhanwar3696
@ayushjhanwar3696 3 жыл бұрын
@@mauryaashish1865 8 months ;(
@sandhyashivhare2955
@sandhyashivhare2955 3 жыл бұрын
10 months
@armedgamer3636
@armedgamer3636 3 жыл бұрын
Hi apna college. Amazing video you have made here, full of learning. Please can you upload notes for this video?? Regards
@dm01417
@dm01417 3 жыл бұрын
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 !!
@srijankunduchowdhury
@srijankunduchowdhury 3 жыл бұрын
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)
@harshitasinghdulawat7956
@harshitasinghdulawat7956 Жыл бұрын
she has done wrong! ,right?
@0xatul
@0xatul 4 жыл бұрын
Why do we even need to calculate Time Complexity? Is it asked in some interviews? Or is it just for our own understanding and for understanding the call stack?
@sit33darshanpagar16
@sit33darshanpagar16 3 жыл бұрын
We find time complexity to make our program fast
@ganeshmurmu2338
@ganeshmurmu2338 3 жыл бұрын
Bhai ek baar competitive websites use karke dekh sara jawab mill jaeyga, time complexity kyu zarure hey, Bohot jarure hey bhai!!!!!!!
@sayantaniguha8519
@sayantaniguha8519 3 жыл бұрын
@@ganeshmurmu2338 link bhej tu aur bta teko aisa kyu lagta ?
@ganeshmurmu2338
@ganeshmurmu2338 3 жыл бұрын
@@sayantaniguha8519 dekho, simplest bhasa mey boley to, competitive coding websites mey difficult questions mey O(n) time complexity wala solution banana parta hey isley time complexity is important
@ganeshmurmu2338
@ganeshmurmu2338 3 жыл бұрын
Agar samjh nai aya to ek watsapp group banatey hey? Or if yo don't want to share number than telegram group, accha discussion, doubt solving ho payega..... What do you think?
@AkshdeepSingh-ef4tw
@AkshdeepSingh-ef4tw 3 жыл бұрын
awesome .......................................
@deepaklavate4165
@deepaklavate4165 4 жыл бұрын
Efforts appreciated ❤❤ But can you tell me why is this technique named "Binary"?
@suraj_chaudhary143
@suraj_chaudhary143 4 жыл бұрын
Because there is a comparison after half of the array ..of mid term and key...it may be true (1) and false(0).. i.e binary..
@sayanghosh6996
@sayanghosh6996 4 жыл бұрын
@@suraj_chaudhary143 lol no thats not the reason. Its called binary search because in every step the array is being divided into two(bi) parts.
@weasleygaming3
@weasleygaming3 4 жыл бұрын
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?
@rameshmalhotra9525
@rameshmalhotra9525 3 жыл бұрын
kzbin.info/www/bejne/a3fWepRqgtVmntE
@urvashibhalerao1
@urvashibhalerao1 2 жыл бұрын
please upload notes aman bhaiyya . nicee vidoooo !!!!!!!!!!!!!!!!!!!!!!!
@mrp3443
@mrp3443 4 жыл бұрын
Please also make a video on logarithm. And also this course is just fantastic
@parasmoharle
@parasmoharle Жыл бұрын
Bro if u dont know anything about log just learn basic or mid and then come back same for derivation and integration
@SauravKumar-yo8hb
@SauravKumar-yo8hb 3 жыл бұрын
great content
@somnathduttabanik5048
@somnathduttabanik5048 4 жыл бұрын
please upload the notes... thank you for the lecture series
@piyushthakur3896
@piyushthakur3896 3 жыл бұрын
its is just amazing
@jonny._.1313
@jonny._.1313 4 жыл бұрын
It's been 2 months , we haven't got notes of this lecture.
@rishisingh7527
@rishisingh7527 4 жыл бұрын
@ADITYA PRATAP SINGH TOMAR no notes needed if u know the algorthim
@pgraju1125
@pgraju1125 3 жыл бұрын
Its been 1yr now
@deepsahil__
@deepsahil__ Жыл бұрын
It's 2 years now 😂
@vedantnaikwadi4130
@vedantnaikwadi4130 Жыл бұрын
​@@deepsahil__😂😂
@jonny._.1313
@jonny._.1313 Жыл бұрын
@@deepsahil__ don't study if you are newbie from them these lectures are for those who know these things already
@darshanpathak5188
@darshanpathak5188 4 жыл бұрын
Aman Bhaiya is taking education to the next level🙏🙏🙏
@sohamDevRel
@sohamDevRel 4 жыл бұрын
When would the notes be uploaded?
@anujsaini4454
@anujsaini4454 4 жыл бұрын
Didi you are amazing 😘😘
@AryanKohli-hkscx
@AryanKohli-hkscx 3 жыл бұрын
12:11 it should be n/(2^(k-1))
@Kshitish_th
@Kshitish_th 3 жыл бұрын
Yp i was thinking sane
@rishikoiri2
@rishikoiri2 Жыл бұрын
your voice is so good
@agrawalhimanshu
@agrawalhimanshu 4 жыл бұрын
Bhaiya I have a doubt , if after 3rd iteration length is n/2square then after kth iteration the length should be n/2 to the power k-1 and not n/2 to the power k.....am i right ??
@alimemon3054
@alimemon3054 4 жыл бұрын
I also have the same doubt
@gauravpoosarla
@gauravpoosarla 4 жыл бұрын
yes you are correct, there are some more mistakes which i saw in the video but anyways the explanation was great, do try to read from multiple sources and then come to a conclusion.
@agrawalhimanshu
@agrawalhimanshu 4 жыл бұрын
@@gauravpoosarla Yes Aman bhaiya is great
@techega7632
@techega7632 4 жыл бұрын
Haan bhai bt usse fark nii pdega solve kr ke dekho.. (log n base 2) +1 aayega tb bhi binary search hi jyada efficient h as compared to linear search.
@agrawalhimanshu
@agrawalhimanshu 4 жыл бұрын
@@techega7632 Ha bhai
@ShivaKumar-y1k5z
@ShivaKumar-y1k5z 10 ай бұрын
Shraddha mam speaking so sweetly..😂 ... I am watching this video on 31/03/2024 ...❤
@ayushiydvKG
@ayushiydvKG 6 ай бұрын
yess shocking kinda 😂
@mihirmakwana1141
@mihirmakwana1141 4 жыл бұрын
Sir please upload notes of this video.
@cs-oi4im
@cs-oi4im 3 жыл бұрын
Size of array should be a constant number and should be given at compile time. int size=5; int arr[size]; //it generates error int arr[5]; //works fine I don't know why her compiler didn't generate any error when she wrote arr[size]. If i am wrong then please correct me
@AbdulWahab-fk9yf
@AbdulWahab-fk9yf 2 жыл бұрын
she is using mac that's why In windows we have to give an integer value of size at time of declaration
@cs-oi4im
@cs-oi4im 2 жыл бұрын
@@AbdulWahab-fk9yf Maybe, it's because of IDE too
@dexhorox7394
@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
@aditijain8682
@aditijain8682 4 жыл бұрын
Hello bhaiya You have best animators of india so why don't you make animatotion tutorials... It will be really helpful for us.. also these animation tutorials are not available on KZbin also
@THEELECTRICGUY
@THEELECTRICGUY 4 жыл бұрын
There is a small mistake in the video; In the function, variable e should be initialized with (n-1) rather than n If you run the program and enter a value greater than the values you have given to the array then you will not get -1 rather you will get the same number as an output!!! which is weird...
@prometheus3899
@prometheus3899 Жыл бұрын
thanks thought same
@ayushbundela8072
@ayushbundela8072 4 жыл бұрын
Bhayiya, make a full knowledge video of VS studio..... 🙏🙏
8.3.1 Sorting in Arrays | Selection Sort |  C++ Placement Course
8:32
Apna College
Рет қаралды 1,1 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Searching Array | Linear Search | Using C++ (Urdu /Hindi)
11:41
Linear Vs Binary Search + Code in C Language (With Notes)
35:12
CodeWithHarry
Рет қаралды 787 М.
8.1 Introduction to Arrays in C++ | Guaranteed Placement Course
12:32
Apna College
Рет қаралды 1 МЛН
Watch this before you start Coding! 5 Tips for Coders
13:53
Apna College
Рет қаралды 468 М.
Why People Quit Coding? 3 Major Reasons
17:36
Apna College
Рет қаралды 1,6 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН