Lecture 9: Introduction to Arrays in C++

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 3,2 тис.

  • @CodeHelp
    @CodeHelp  3 роки тому +392

    Do make sure to visit Relevel: relvl.co/pox1

    • @vaibhavgupta8144
      @vaibhavgupta8144 3 роки тому +10

      @Babbar bhaiya please update the video of *LECTURE 8 & 9* with captions

    • @techprogrammer4158
      @techprogrammer4158 3 роки тому +3

      Bro I am ECE student final I want to crack Amazon But I don't know DSA. So please make a videos on ALGOS AND DS.

    • @CodeHelp
      @CodeHelp  3 роки тому +8

      @@vaibhavgupta8144 For Video 8, its Done

    • @CodeHelp
      @CodeHelp  3 роки тому +14

      @@techprogrammer4158 this series is dedicated to DSA only

    • @techprogrammer4158
      @techprogrammer4158 3 роки тому +6

      @@CodeHelp Ha Bro thanks 😊💗

  • @tribhuwanjoshi6485
    @tribhuwanjoshi6485 3 роки тому +467

    The fact that you are teaching not only "How" but also "Why" makes this tutorial even better.

  • @kartikgupta4500
    @kartikgupta4500 3 роки тому +447

    Homework
    #Question 1: (20:11)
    We can initialize the array with any value by using the fill_n command
    Example code:
    #include
    using namespace std;
    int main() {
    int array[100];
    //To initialize the array with value'1'.
    fill_n(array, 100, 1);
    //To check the array input (kewaal 5 hi kari h print)
    for(int i = 0; i

  • @Not__Sid
    @Not__Sid Рік тому +45

    no one can beat the quality and value of your content even after a year this playlist is the best

  • @vishu3766
    @vishu3766 2 роки тому +61

    // #Question 1: (20:11)
    // We can initialize the array with any value by using the fill_n command
    // Example code:
    // #include
    // using namespace std;
    // int main()
    // {
    // int ar[10];
    // fill_n(ar,10,1);
    // for (int i = 0; i

    • @AdityaChauhan-xg5md
      @AdityaChauhan-xg5md Рік тому +3

      For Question 1 the java alternative for fill_n is Arrays.fill(name of array,what u want to fill)
      Ex:-
      import java.util.Arrays;
      class Solution {
      public static void main(String[] args) {
      int a[] = new int[10];
      Arrays.fill(a,2);
      for (int i = 0; i

    • @Zenetz-le4mq
      @Zenetz-le4mq 11 місяців тому +1

      i < 10; not i

  • @aksv_24
    @aksv_24 Рік тому +5

    1:26:00 for reversing the array
    void reverseArray(int arr[], int n)
    {
    cout

  • @vineetsinghnegi6297
    @vineetsinghnegi6297 Рік тому +37

    50:20
    If the output is showing "INT_MAX is not declared in the scope"
    than use #include
    it will work

    • @sayarnilroy5999
      @sayarnilroy5999 4 місяці тому +3

      Thanks it worked but why he is able to use it without the header file?

    • @asr-m4o
      @asr-m4o 4 місяці тому +2

      @@sayarnilroy5999 bro its depends upon the compiler u r using , some compilers do include them but some dont .thats why

    • @asr-m4o
      @asr-m4o 4 місяці тому

      @@sayarnilroy5999 but you should always use those header files for portability ,readability, hope it helps

    • @chetnasinghal2872
      @chetnasinghal2872 3 місяці тому

      thanks bro

  • @karthikhkamath
    @karthikhkamath 3 роки тому +794

    12th me alakh pandey sir or college me Love Babbar sir, kya lucky hai bhai hum log😍!

  • @yadvibhalla5392
    @yadvibhalla5392 3 роки тому +184

    This course is a great initiative; many CSE students are struggling because of DSA. It's so kind of you to consider others and devote yourself to creating this course. Thank you so much, it means a lot bhaiya.

    • @jatinrauthan9075
      @jatinrauthan9075 2 роки тому +15

      Hrr kisi ka bhaiya bolna jruri nhi hota Thanks a lot se kaam chal jata h .

    • @niteshk0487
      @niteshk0487 2 роки тому +7

      @@jatinrauthan9075 😂😂😂😂👌👌

    • @ahmedqureashi
      @ahmedqureashi 2 роки тому +1

      bhaiyaa boldia

    • @niteshk0487
      @niteshk0487 2 роки тому

      @@ahmedqureashi kya bol diya?

    • @vedantkanoujia
      @vedantkanoujia 2 роки тому

      @@jatinrauthan9075 haan yrr koi samjhta hi nhi hai

  • @kabhi.kabhi.aditi21
    @kabhi.kabhi.aditi21 Місяць тому +6

    watching it in 2024 as my campus placement is near, studying has become so enjoyable with this channel, i started from zero and i am at a different level today with the help of these videos. Thank you!

  • @shambhumaurya8682
    @shambhumaurya8682 6 місяців тому +4

    Jo chij UNIVERSITY ki professor nahi samjha paaye wo aapne samjha diya ek dam depth. Thank you so much bhaiya

  • @aliabbasnaqvi5551
    @aliabbasnaqvi5551 2 роки тому +12

    SIR, YOUR TEACHING IS ABSOLUTELY BRILLIANT, YOU ARE NOT JUST TEACHING TOPICS BUT ALSO SOLVING A LOT OF QUESTIONS FOR OUR PRACTICE WHICH MOST OF THE TEACHERS DON'T. THANKS FROM THE BOTTOM OF MY HEART. KEEP GOING!

  • @AteebTahir-z1i
    @AteebTahir-z1i 10 місяців тому +1

    00:00Introduction
    03:10 - Promotion
    04:18 - What is Array ?
    09:05 - Why array ?
    11:25 - Declaring Arrays
    14:04 - Indexes in Array
    16:36 - Accessing in array
    17:55 - Initialisation in Arrays
    20:11 - Homework
    20:55 - Implementation
    32:32 - Arrays with Functions
    39:56 - Different types of Arrays
    43:31 - Maximum/Minimum in an Array
    54:10 - Scopes in Array
    57:56 - Why arr[0] changed in main function ?
    01:02:08 - Homework
    01:04:44 - Linear Search
    01:14:07 - Reverse an Array

  • @fahadrashid8529
    @fahadrashid8529 2 роки тому +15

    You are the best teacher anyone can have. With such a good vibe and energetic voice.
    Thanks for always pushing us and keeping us motivated

  • @int_topics
    @int_topics Рік тому +12

    bhaiya, i think the most important thing in this course is you are developing intuition and how to think or approach to a particular question along with how can we relate with things that we are already learnt. Amazing

  • @vishalvardhan8498
    @vishalvardhan8498 Рік тому +13

    Thanks for teaching this valuable course for free bhayya ❤
    it's more worth than a paid course 💯

  • @amishasharma4916
    @amishasharma4916 2 роки тому +20

    late to the party but this series is the best I've found for free. The way you teach seems more like group discussion where we get to say or think from different perspective.

  • @rameshwari
    @rameshwari 3 роки тому +23

    I was eagerly waiting for this!!!
    Thank you so much
    You are the best teacher
    Keep posting all the videos!

  • @Luffy_2804
    @Luffy_2804 Рік тому +7

    now shifted to java but your explanation of questions is way to good using your videos as a reference thanks for this amazing free course

  • @akashbr25
    @akashbr25 2 роки тому +5

    I started watching this playlist after 9 months, regretting why I didn't see this before
    Such a good explanations, thank you!!

  • @piyushsatange4655
    @piyushsatange4655 3 роки тому +326

    I already know C++ but after following your course I learn some new concepts which other have not cover thanks to you bhaiya :)

  • @CodeingJourney
    @CodeingJourney Місяць тому +3

    int num[10]={3,5,6,7,8,9,0};
    int size=7;
    for(int i= size-1; i>=0; i--){
    cout

  • @tripteshsharma6045
    @tripteshsharma6045 2 роки тому +16

    Hi Bhaiya, Just started your tutorial and learning DSA in a good way.
    Just wanted to mention to all that I have figured out one more way to reverse an array:
    for (int i = sizeOfArr; i > sizeOfArr / 2; i--)
    {
    int tempValue = arr[i - 1];
    arr[i - 1] = arr[sizeOfArr - i];
    arr[sizeOfArr - i] = tempValue;
    }

    • @glaciar_range3270
      @glaciar_range3270 2 роки тому

      their is some problem for odd number , if size of array is 5 so i > 5/2 then i > 2 because of in integer 5/2 is not equial to 2.5 it's equial to 2

    • @poojabhati5080
      @poojabhati5080 2 роки тому

      we can do
      for(int i=0; i

    • @RahuLCS-uh6rx
      @RahuLCS-uh6rx 2 роки тому

      @@poojabhati5080 the concept which u r doing comes under stl.. and the one hes doing it is using 3 variables

    • @RahuLCS-uh6rx
      @RahuLCS-uh6rx 2 роки тому

      u shud use sizeof(arr)/sizeof(arr[0])....

  • @rahulsil3827
    @rahulsil3827 2 роки тому +78

    Started the course few days back, and already loving it. My DSA knowledge is getting stronger with each session with all the concepts and coding questions. Ab toh big companies mai select ho jayenge mehnat karke as Babbar bhaiya sath hai. Thank you Babbar bhaiya. ❤️

    • @beast3967
      @beast3967 2 роки тому +3

      Did you completed the course??

    • @Masingo
      @Masingo Рік тому

      It's been a year. Any updates? Where are you now?

    • @Dagani1221
      @Dagani1221 11 місяців тому +1

      Why dont you enjoy the process, agar kuch bhi seekhe toh acchi hi hai na. Dusron ki success ya life pe kam dhyan do bhai, khud kro phir result ki socho. This course is the best course wid best quality available on internet today. Trust the process and grind. All the best. @@Masingo

  • @naikajsevak6090
    @naikajsevak6090 3 роки тому +33

    initialization of array with any value
    #include
    using namespace std;
    int main()
    {
    int i,n,a;
    cin>>n;
    cin>>a;
    int number[n];
    for(i=0;i

    • @rishabhtyagi7369
      @rishabhtyagi7369 3 роки тому

      no, its not working bro.

    • @rishabhtyagi7369
      @rishabhtyagi7369 3 роки тому

      @umair khan yeah, but how would you explain it when n a large number.

  • @ellis-pr7hh
    @ellis-pr7hh 2 роки тому +14

    u r the best sir, literally...u did your best in this course and u deserve much more views in this series

  • @prashant.y
    @prashant.y 8 місяців тому +1

    my friend pushpendra suggest me to watch your videos 2 years ago but after 2years i finally started watching your videos ....... kudo to me and my friend.

  • @pranavsingh9573
    @pranavsingh9573 2 роки тому +4

    20:37
    To initialise an array we use
    Int array[ 100 ] = { [0....99] = -1 };
    Or we can use loops..

  • @yashchampaneri1972
    @yashchampaneri1972 3 роки тому +8

    Present sir
    I am very excited from this lecture because now main dsa is going to start!

  • @rachitbharadwaj
    @rachitbharadwaj 2 роки тому +33

    I started my DSA journey today and this is the #Day1 of my #100DaysOfDSA. I'll be referring to your course. This particular video was very well explained and helpful. Thankyou bhaiya!

    • @lostcyrus8578
      @lostcyrus8578 2 роки тому +1

      How was the course?

    • @rachitbharadwaj
      @rachitbharadwaj 2 роки тому +1

      @@lostcyrus8578 just go through it, its really good and things are explained very well.

    • @akshatfarkya4783
      @akshatfarkya4783 2 роки тому +1

      @@rachitbharadwaj I'm learning c++ currently and joined private coaching for DATA STRUCTURE as I'm in my 2nd year of btech ... So can I follow this or I have to go coaching which is better?

    • @rachitbharadwaj
      @rachitbharadwaj 2 роки тому +1

      @@akshatfarkya4783 you can definitely follow this DSA course✌️... But if you have paid the coaching fees... Then try to maintain a balance between both if you can

    • @akshatfarkya4783
      @akshatfarkya4783 2 роки тому

      @@rachitbharadwaj I haven't paid fees coz today's was my first day.... So is it worth or I can learn from this series???... how much learned from this series?? Is this series started from c++ and ended with whole Data structure syllabus??..... If I have little bit knowledge of c++ than can I join thiss??? C++ is completely covered??

  • @priya9820
    @priya9820 3 роки тому +54

    Great content! Would love to see leetcode contest problems solving sessions after covering some basic DS concepts :)

  • @shivaniverma4266
    @shivaniverma4266 Рік тому +1

    1:27:54 logic : start will as usual start from 0, end will be a head that is 1 and increments for both are like ++2

  • @tanishqsoni830
    @tanishqsoni830 Рік тому +4

    at (1:26:22)
    we can also use only i to swap values of array
    for (int i = 0; i < size/2; i++)
    {
    swap(arr[i],arr[size-i-1]);
    }

  • @aviraljoshi-vx9kq
    @aviraljoshi-vx9kq Рік тому +3

    lec 9 done.. I have learned really a lot things new and amazing great mentor and teacher @Love Babbar

  • @Mr.vinay.1945
    @Mr.vinay.1945 Рік тому +1

    1:14:15
    reverse array c++ without using swap method
    int arr[5] = {2, 7, 5, 9, 10};
    for (int i = 4; i >= 0; i--) {
    cout

  • @AlokKumar-vg9jc
    @AlokKumar-vg9jc 2 роки тому +6

    I feel very blessed when i watch your lecture
    totally satisfied with your course sir.
    love from bihar.

  • @Parul98734
    @Parul98734 8 місяців тому +17

    To initialize the whole array with a constant value other than 0 ,
    We can use two methods in C++
    method 1: using STL (preferred)
    fill(array, 100, 2);
    Will fill the whole array with a value of 2
    method 2: using loop
    int array[100];
    for (int i = 0; i < 100; ++i){
    array[i] = 2;
    }
    Hope this helps

    • @TAHASAYYED-k9t
      @TAHASAYYED-k9t 6 місяців тому

      It can be also done by using simple looping and all index elements declare be one

    • @TAHASAYYED-k9t
      @TAHASAYYED-k9t 6 місяців тому +1

      Yeah you did correct 💯

  • @AbdulAhad-r7r
    @AbdulAhad-r7r Місяць тому +1

    20:49
    If you use {1} to initialize an array:
    Only the first element of the array is set to 1.
    All other elements are left uninitialized, meaning they might contain random values (garbage values).

  • @yashgupta8896
    @yashgupta8896 2 роки тому +10

    #Day1 of starting my coding journey. Looking forward to learn more. Thanks for helping me resolving my doubts........This 1.5hr long video took me near around 2 to 2.5 but it was all fun and worth it..
    once again Thank you so much !!

  • @shoaib_akhtar_1729
    @shoaib_akhtar_1729 Рік тому +10

    Great Lecture By Babbar Bhaiya with Theory + Practical Implementation as well...Hum Placements Phodege aur Aapko Party Dege! .... We will do all the homework and solve atleast 3 leetcode questions daily ...

  • @shubhamkumarsingh1810
    @shubhamkumarsingh1810 Рік тому +1

    01:02:08---homework
    #include
    using namespace std;
    int main(){
    int n;
    int sum=0;
    cout

  • @pankushsharma3883
    @pankushsharma3883 2 роки тому +39

    This series never gets old🙌

  • @udayprattap
    @udayprattap Рік тому +4

    Love you brother
    Was looking for exactly what you offered, I am just addicted to every video goona complete it soon

  • @vachankapoor1539
    @vachankapoor1539 Рік тому

    home work 20:11
    int arr[n];
    for(int i=0;i

  • @CookingWidAJ
    @CookingWidAJ 2 роки тому +24

    series going so smoothly and good .. hope we all achieve our goals..... Thanks to you bhaiya for making this beautiful series for us @Love Babbar bhaiya ....

  • @amandwivedi976
    @amandwivedi976 2 роки тому +9

    1:02:08 "Sum of User Input Array"
    #include
    using namespace std;
    int sumArr(int arr[], int size)
    {
    int sum = 0;
    for (int i = 0; i < size; i++)
    {
    sum = arr[i] + sum;
    }
    return sum;
    }
    int main()
    {
    int size;
    cin >> size;
    int arr[100];
    for (int i = 0; i < size; i++)
    {
    cin >> arr[i];
    }
    cout

  • @vivekanandkumar8493
    @vivekanandkumar8493 Рік тому +1

    This DSA tutorial video is a game-changer for learning coding techniques!

  • @anuradhajadon4827
    @anuradhajadon4827 3 роки тому +43

    Present bhaiya
    Even after getting placed i am watching your videos just to cover basics of dsa and making my dsa stronger for applying in product based companies for higher package.
    Thank you bhaiya for all your efforts.

  • @CaptainInfiverse
    @CaptainInfiverse 11 днів тому +1

    HW (20:36) - Two methods to initialize any no. of elements with any value in an array: -
    int array4[7];
    fill(array4, array4 + 7, 3);
    int array5[7];
    fill_n(array5, 7, 3);

  • @anushkayachit
    @anushkayachit 3 роки тому +13

    Finally the concept of Arrays is here!!!! Was eagerly waiting...... Thank you so much!!!

    • @hitsharnam3177
      @hitsharnam3177 3 роки тому

      I know Java not c++, can i do this course?

  • @santoshanand4867
    @santoshanand4867 2 роки тому +4

    Some time before I think I will do dsa in java but after see this great play list I'm started my dsa journey In cpp
    Thank you Love bhaiya for this play list ♥️♥️♥️

  • @kunalkumarmaurya7253
    @kunalkumarmaurya7253 7 місяців тому +1

    1:22:20 we can traverse half of our array so there will be no need for condition to stop it, it will work both for even and odd elements of array.

  • @ShoaibShaikh-sd4vd
    @ShoaibShaikh-sd4vd 2 роки тому +24

    2) HomeWork :
    #include
    #include
    using namespace std;
    int sumarray(int arr[],int arr_size){
    int sum = 0;
    for(int i = 0; i

    • @ktedu9483
      @ktedu9483 2 роки тому

      Use #include for all the headers file that we need in cp

  • @harshitkumar197
    @harshitkumar197 2 роки тому +10

    honestly i am really enjoying this course. Thank you for creating a free valuable course. And what you said on your latest video posted on 15th sept about the camera cover" free ki chiz acchi nhi hoti" but you are wrong. This free course is really a gem

  • @PRINCEKUMAR-xf4eq
    @PRINCEKUMAR-xf4eq 11 місяців тому +1

    Jitna achha se aap pdate ho sayd koi itna achha se pdate hai.❤❤❤🎉🎉🎉

  • @suvigyabasnotra7378
    @suvigyabasnotra7378 3 роки тому +12

    Loved one correction that was made after the previous lecture that your face was covering the code in some cases and sometimes you were drawing something but the window didn't switch in time. That didn't happen at all in this video! Watched it thoroughly.
    Another thing, just try to upload daily. Kudos to the team for the efforts!

  • @astha_d
    @astha_d Рік тому +4

    your lectures and way of teaching are so easy to understand ,. You are doing so great, Thank you bhaiya for the lovely and valuable content.

  • @SUJALDINGANKAR
    @SUJALDINGANKAR 4 місяці тому

    Your C++ DSA video playlist is truly amazing! After searching all over UA-cam for the best DSA content in C++, I finally found the perfect source. Thank you!

  • @hidayatbukhari1887
    @hidayatbukhari1887 2 роки тому +5

    Starting off my DSA journey with this. Will get definitely placed in MAANG one day

  • @akshaysinghbhadoriya7967
    @akshaysinghbhadoriya7967 2 роки тому +5

    bhaiya your videos are amazing and easy to understand.You are the only hope for us to acheive faang,so please keep teaching us and please don't feel demotivated at any point of time.

  • @siddharth_gupta_
    @siddharth_gupta_ Рік тому

    20:48
    #include
    using namespace std;
    int main()
    {
    int a[100];
    fill_n(a, 100, 1);
    //intializes an array named a of 100 size with value 1 for each element
    for (int i = 0; i < 100; i++)
    {
    cout

  • @kishansinghc1581
    @kishansinghc1581 3 роки тому +5

    Some knowledge about array -
    When we partly initialize array with any number other numbers get automatically initialized with 0.
    So , that's why , when we do this int arr[20] = { 0 } , this will initialize the arr[0] will 0 and as it is partly initialize .Therefore all rest of the element get initialize with zero .

  • @poojatajane9660
    @poojatajane9660 3 роки тому +13

    Present sir...The josh of your students is always high... thank you so much sir 😊Pka hai placement 💯

  • @narutodihargo
    @narutodihargo Рік тому

    00:00 - Introduction
    03:10 - Promotion
    04:18 - What is Array ?
    09:05 - Why array ?
    11:25 - Declaring Arrays
    14:04 - Indexes in Array
    16:36 - Accessing in array
    17:55 - Initialisation in Arrays
    20:11 - Homework
    20:55 - Implementation
    32:32 - Arrays with Functions
    39:56 - Different types of Arrays
    43:31 - Code-01= Maximum/Minimum in an Array
    54:10 - Scopes in Array
    57:56 - Why arr[0] changed in main function ?
    01:02:08 - Homework
    01:04:44 - Linear Search
    01:14:07 - Reverse an Array
    01:27:31 - Some Question for next Video

  • @rise_MaNaK
    @rise_MaNaK 3 роки тому +15

    Let me tell you one thing...I am a beginner in DSA but you can count me in your list of people who got selected after learning from this DSA series....thanks....waiting for next video

    • @AayushGoyal
      @AayushGoyal 2 роки тому +2

      Krishna, where are you now? Aayush from iGate

  • @ranaabubakar2217
    @ranaabubakar2217 3 роки тому +4

    I am learning a lot from this course thanks love from Pakistan

  • @forever.1234
    @forever.1234 9 місяців тому +1

    bhai aapke samjhane ki skills god. love you bhai.. thanks for your efforts.

  • @human75788
    @human75788 3 роки тому +11

    You are just an outstanding teacher, mentor , guide like everything.. the day you announced the arrival of this series, that day I took a resolution to follow each and every word of yours and work as hard as I can!

  • @lovingart3820
    @lovingart3820 2 роки тому +4

    we can initialize and print entire array with 1 like this-
    int main(){
    int arr[10];
    int n =10;
    for(int i=0 ; i

  • @MohammadRiyan-co6hf
    @MohammadRiyan-co6hf Рік тому

    1:02:08
    ------ Solution -------
    int SumOfArrayElements(int arr[],int n)
    {
    int sum=0;
    for (int i=0;i

  • @rasid_khan
    @rasid_khan 3 роки тому +5

    int a[7];
    fill_n(a,7,-1);
    This "fill_n()" used to filled array with any specific value

  • @aryansharma144
    @aryansharma144 2 роки тому +7

    No one can match this perfection level in DSA course 🥇🔥❤️

  • @vedsingh6934
    @vedsingh6934 2 місяці тому

    Cheeje itni crystal clear ho rhi h ki bahut emotional 😭 ho gye andar se
    Thanku bhaiya ❤

  • @sayanmukherjee8563
    @sayanmukherjee8563 2 роки тому +8

    Amazing Contents... easy to understand. Thanks a lot for your DSA series. It has been helping me a lot.❤

  • @manojtiwari7754
    @manojtiwari7754 2 роки тому +5

    Hey, Thank you so much for this beautiful course but I use python for programming. So, I am watching this and learning the concepts from you and applying the knowledge in python. I have been struggling to nail DSA but looking at your course gives me confidence that I can learn DSA. I aiming for MAANG companies. Can you please guide me what additional reading or courses or practice that I would need for that. Thank you again and keep up the good work. Really hope to hear from you.

  • @RohitKannaujiya-i1r
    @RohitKannaujiya-i1r Рік тому +1

    Bhaiya, mughe lagta hai abb mai kuch new best kar sakta hu aapke padhane ke baad❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤

  • @ADITYAKUMARVERMABAI
    @ADITYAKUMARVERMABAI 2 роки тому +4

    ARRAY HOMEWORK QUESTION-
    /* C++ Program to find sum of elements
    in a given array */
    #include
    using namespace std;

    // function to return sum of elements
    // in an array of size n
    int sum(int arr[], int n)
    {
    int sum = 0; // initialize sum

    // Iterate through all elements
    // and add them to sum
    for (int i = 0; i >n;
    int array[n];
    for(int i=0;i>array[i];
    }
    cout

  • @ExplorewithVishal765
    @ExplorewithVishal765 2 роки тому +5

    Lecture 9 completed 💯😊

    • @mohitahir6020
      @mohitahir6020 2 роки тому

      Bro me bhi ye course krne ki soch rha hu ky me kar skta hu please bataye

  • @nikhil_legend16
    @nikhil_legend16 Рік тому

    1:05:00
    #include
    using namespace std;
    int printSum(int arr[],int n){
    int sum=0;
    for(int i=0;i>size;
    //Taking an input
    for(int i=0;i>num[i];
    }
    cout

  • @mythcodes
    @mythcodes Рік тому +5

    Instead of finishing a web series or anime. I am gonna finish this series.

    • @ishaanms9194
      @ishaanms9194 Рік тому +1

      actually, this line motivates many people like me to watch DSA tutorial

  • @atkkb2724
    @atkkb2724 5 місяців тому +1

    1:04:22
    To be honest google search bhi nhi kri.
    Khud se nikala..
    Magar doubt me tha Abhi apne bataya to aalag hi dopamine release hui to happy...
    Yessssss

  • @wazowski5296
    @wazowski5296 5 місяців тому +2

    1:03:33 There's one more approach to find power of 2.
    We find the quotient of the given number and if the modulus of the quotient is 0, then it is in power of 2 else false.
    int main(){
    int n;
    coutn;
    cout

    • @Ken-d8c
      @Ken-d8c 4 місяці тому +1

      you will have to run it in a while loop actually, till the quotient is 0, because in this case,
      let n = 36,
      then p = 36/2 = 18
      here 18%2 = 0
      hence the output will be "power of 2" which will be false.

  • @japjeetsingh2354
    @japjeetsingh2354 4 місяці тому

    20:40 Home Work Question :-
    Initialization :
    i) std :: fil_n(array, 100, -1);
    ii) designated initializers :
    int arr[] = { [ 0 ... 99] = 1 }; // here we can ignore the size of an array;
    cout

  • @deeksha-cm8kq
    @deeksha-cm8kq 7 місяців тому

    Hello Sir agar aap abhi bhi comment dekhte hai to , I just want to say thankyou so much , aapka padhane ka tareeka bahut accha hai aur aapki dedication apke har lecture me dikhti hai.

  • @vanshanand8422
    @vanshanand8422 Рік тому

    Homework
    Sum of elements of an array-
    int getsum(int arr[],int n){
    int sum=0;
    for(int i=0;i

  • @payalthakur-gw1uc
    @payalthakur-gw1uc 2 місяці тому +1

    you did a very good job , i really really appreciate your hard work . thanku so much for making this DSA playlist 😊😊

  • @JatinBaghel-u7v
    @JatinBaghel-u7v 4 місяці тому

    Best playlist for DSA ever in youtube.. ❤❤❤❤❤

  • @risavkumarjha6899
    @risavkumarjha6899 Рік тому +1

    Awesome dsa course by "Babbar bhaiya",Thanks for sharing.

  • @vivekanand9492
    @vivekanand9492 5 місяців тому +1

    Very helpful vedio for learning dsa in c++ from basic to advance

  • @msatt5487
    @msatt5487 Рік тому +1

    aaj jake malum chala, ki max() aur swap() function bhi hote hai. college wale pata ni kya kya karwate rehte hai. thanks a lot bhaiya

  • @anujverma1337
    @anujverma1337 Рік тому

    01:02:08 => Homework
    // Homework : Print sum of all elements in an array
    #include
    int sumArray(int num[], int n){
    int sum = 0;
    for(int i=0; i < n ; i++){
    sum = sum + num[i];
    }
    return sum;
    }
    using namespace std;
    int main(){
    int n;
    cout > n;
    int num[100];
    for(int i=0; i < n; i++){
    // taking input in an array
    cin >> num[i];
    }
    cout

  • @ombilariya44
    @ombilariya44 Рік тому

    1:03:00 hw que solution
    CPP:
    #include
    using namespace std;
    int getSum(int arr[], int size)
    {
    int sum = 0;
    for(int i = 0; i< size ; i++){
    sum = sum + arr[i];
    }
    return sum;
    }
    int main()
    {
    int array[10000],size;
    coutsize;
    for(int i = 0; i>array[i];
    }
    cout

  • @preetiprajapat536
    @preetiprajapat536 Рік тому +1

    1:02:14
    homework question-------->
    #include
    using namespace std;
    int sum(int array[], int n) {
    int sum = 0;
    for (int i = 0; i < n; i++) {
    sum = sum + array[i];
    }
    return sum;
    }
    int main() {
    int arr[100];
    int n;
    cout > n;
    for (int i = 0; i < n; i++) {
    cout

  • @ravishivhare9624
    @ravishivhare9624 Рік тому

    reverse array in another way: int a[] = {1,2,3,4,5,6}; for(int i=a.length-1; i>=0; i--) and print a[i]; again great content.

  • @fnaaz6038
    @fnaaz6038 Місяць тому

    20:46 We can use a loop to assign the value to each element individually, which works across all languages.

  • @anurag_gautam00
    @anurag_gautam00 Рік тому +1

    INTRESTING AND ENJOYING LECTURE BY LECTURE SIR BIG FAN

  • @anuragpandey4406
    @anuragpandey4406 Рік тому

    🔥Saree clg ki pressure eek taraf & babbar bhai ki class eek taraf ❤️

  • @MrigankRaj-ux1yt
    @MrigankRaj-ux1yt Рік тому +1

    fact that i am seeing this video after a year and it seem to be interesting and knowledge even now . love you sir you are best

  • @md.parvezlimon9263
    @md.parvezlimon9263 Рік тому

    Babar bhai just Love from Bangladesh . I am learning so many things from you. Even I can code now, which was totally out of the league. Thank you bhai. Bohot maja aa raha he :)

  • @eddygeorge3798
    @eddygeorge3798 Рік тому

    Question 2: (1:02:52)
    #include
    using namespace std;
    int main(){
    int array[100];
    int n;
    coutarray[i];
    }
    cout