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
// #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
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
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.
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!
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!
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
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.
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; }
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. ❤️
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
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.
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!
@@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?
@@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
@@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??
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
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).
#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 !!
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 ...
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 ....
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
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.
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);
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 ♥️♥️♥️
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
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!
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!
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.
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
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 .
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
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
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!
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.
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
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
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.
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
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.
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
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
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
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 :)
Do make sure to visit Relevel: relvl.co/pox1
@Babbar bhaiya please update the video of *LECTURE 8 & 9* with captions
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.
@@vaibhavgupta8144 For Video 8, its Done
@@techprogrammer4158 this series is dedicated to DSA only
@@CodeHelp Ha Bro thanks 😊💗
The fact that you are teaching not only "How" but also "Why" makes this tutorial even better.
👍👍👍👍👍
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
Thanku Bhaiya I can read your comment and try to initialise 1 to all entire array and successful it works
tampppaaar hai bhai tuh
thx
thanku bro
Fill_n built in function hai kya??
no one can beat the quality and value of your content even after a year this playlist is the best
// #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
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
i < 10; not i
1:26:00 for reversing the array
void reverseArray(int arr[], int n)
{
cout
50:20
If the output is showing "INT_MAX is not declared in the scope"
than use #include
it will work
Thanks it worked but why he is able to use it without the header file?
@@sayarnilroy5999 bro its depends upon the compiler u r using , some compilers do include them but some dont .thats why
@@sayarnilroy5999 but you should always use those header files for portability ,readability, hope it helps
thanks bro
12th me alakh pandey sir or college me Love Babbar sir, kya lucky hai bhai hum log😍!
Also , bhai jee competishun team se finish kiya tha now from love babbar bhaiya 💥💫
Which college bro
@@subhashnaidu2342 mit manipal bro
@@karthikhkamath which dept. bro ....
@@jaylandge7517 ece :`)
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.
Hrr kisi ka bhaiya bolna jruri nhi hota Thanks a lot se kaam chal jata h .
@@jatinrauthan9075 😂😂😂😂👌👌
bhaiyaa boldia
@@ahmedqureashi kya bol diya?
@@jatinrauthan9075 haan yrr koi samjhta hi nhi hai
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!
which placement?
didi konse college me ho🤡🤡
Jo chij UNIVERSITY ki professor nahi samjha paaye wo aapne samjha diya ek dam depth. Thank you so much bhaiya
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!
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
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
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
Thanks for teaching this valuable course for free bhayya ❤
it's more worth than a paid course 💯
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.
I was eagerly waiting for this!!!
Thank you so much
You are the best teacher
Keep posting all the videos!
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
I started watching this playlist after 9 months, regretting why I didn't see this before
Such a good explanations, thank you!!
I already know C++ but after following your course I learn some new concepts which other have not cover thanks to you bhaiya :)
++
++++
++++++
++++++++
++++++++++
int num[10]={3,5,6,7,8,9,0};
int size=7;
for(int i= size-1; i>=0; i--){
cout
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;
}
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
we can do
for(int i=0; i
@@poojabhati5080 the concept which u r doing comes under stl.. and the one hes doing it is using 3 variables
u shud use sizeof(arr)/sizeof(arr[0])....
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. ❤️
Did you completed the course??
It's been a year. Any updates? Where are you now?
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
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
no, its not working bro.
@umair khan yeah, but how would you explain it when n a large number.
u r the best sir, literally...u did your best in this course and u deserve much more views in this series
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.
20:37
To initialise an array we use
Int array[ 100 ] = { [0....99] = -1 };
Or we can use loops..
not working bro in c++
Present sir
I am very excited from this lecture because now main dsa is going to start!
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!
How was the course?
@@lostcyrus8578 just go through it, its really good and things are explained very well.
@@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?
@@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
@@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??
Great content! Would love to see leetcode contest problems solving sessions after covering some basic DS concepts :)
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
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]);
}
lec 9 done.. I have learned really a lot things new and amazing great mentor and teacher @Love Babbar
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
Explain
I feel very blessed when i watch your lecture
totally satisfied with your course sir.
love from bihar.
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
It can be also done by using simple looping and all index elements declare be one
Yeah you did correct 💯
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).
#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 !!
How was your journey?
@@lostcyrus8578 wonderful
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 ...
01:02:08---homework
#include
using namespace std;
int main(){
int n;
int sum=0;
cout
This series never gets old🙌
Love you brother
Was looking for exactly what you offered, I am just addicted to every video goona complete it soon
home work 20:11
int arr[n];
for(int i=0;i
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 ....
How was your journey?
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
This DSA tutorial video is a game-changer for learning coding techniques!
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.
aap chitfund company mai kaam krte ho...?
superb bhaiya
Aapka naam bhi anuradha hai😂
ua-cam.com/video/XbaA1-BI-zw/v-deo.html
@@nilay2103 😂😂
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);
Finally the concept of Arrays is here!!!! Was eagerly waiting...... Thank you so much!!!
I know Java not c++, can i do this course?
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 ♥️♥️♥️
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.
2) HomeWork :
#include
#include
using namespace std;
int sumarray(int arr[],int arr_size){
int sum = 0;
for(int i = 0; i
Use #include for all the headers file that we need in cp
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
Jitna achha se aap pdate ho sayd koi itna achha se pdate hai.❤❤❤🎉🎉🎉
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!
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.
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!
Starting off my DSA journey with this. Will get definitely placed in MAANG one day
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.
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
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 .
so true ❣❣
Present sir...The josh of your students is always high... thank you so much sir 😊Pka hai placement 💯
di u got placement or not?
@@Peter-nh8jo nhi huva
@@poojatajane9660 kyu
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
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
Krishna, where are you now? Aayush from iGate
I am learning a lot from this course thanks love from Pakistan
Really you are from pak?
@@arjunrai8126 yes bro
@@ranaabubakar2217 ok cool this is the power of internet
@@arjunrai8126 no doubt
bhai aapke samjhane ki skills god. love you bhai.. thanks for your efforts.
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!
we can initialize and print entire array with 1 like this-
int main(){
int arr[10];
int n =10;
for(int i=0 ; i
1:02:08
------ Solution -------
int SumOfArrayElements(int arr[],int n)
{
int sum=0;
for (int i=0;i
int a[7];
fill_n(a,7,-1);
This "fill_n()" used to filled array with any specific value
No one can match this perfection level in DSA course 🥇🔥❤️
Cheeje itni crystal clear ho rhi h ki bahut emotional 😭 ho gye andar se
Thanku bhaiya ❤
Amazing Contents... easy to understand. Thanks a lot for your DSA series. It has been helping me a lot.❤
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.
Bhaiya, mughe lagta hai abb mai kuch new best kar sakta hu aapke padhane ke baad❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤
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
👏
Lecture 9 completed 💯😊
Bro me bhi ye course krne ki soch rha hu ky me kar skta hu please bataye
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
Instead of finishing a web series or anime. I am gonna finish this series.
actually, this line motivates many people like me to watch DSA tutorial
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
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
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.
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
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.
Homework
Sum of elements of an array-
int getsum(int arr[],int n){
int sum=0;
for(int i=0;i
you did a very good job , i really really appreciate your hard work . thanku so much for making this DSA playlist 😊😊
Best playlist for DSA ever in youtube.. ❤❤❤❤❤
Awesome dsa course by "Babbar bhaiya",Thanks for sharing.
Very helpful vedio for learning dsa in c++ from basic to advance
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
Konse year mein ho bro
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
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
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
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.
20:46 We can use a loop to assign the value to each element individually, which works across all languages.
INTRESTING AND ENJOYING LECTURE BY LECTURE SIR BIG FAN
🔥Saree clg ki pressure eek taraf & babbar bhai ki class eek taraf ❤️
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
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 :)
Question 2: (1:02:52)
#include
using namespace std;
int main(){
int array[100];
int n;
coutarray[i];
}
cout