1.3 Array Operations | Deletion from Array | Explanation with Code | Data Structure
Вставка
- Опубліковано 30 вер 2024
- Jennys Lectures DSA with Java Course Enrollment link: www.jennyslect...
Discussed how to Delete data from Array in Data Structure with C program.
Array Operations: Traversal, Insertion with code
• 1.2 Array Operations -...
DSA Full Course: https: • Data Structures and Al...
******************************************
See Complete Playlists:
C Programming Course: • Programming in C
C++ Programming: • C++ Complete Course
Python Full Course: • Python - Basic to Advance
Printing Pattern in C: • Printing Pattern Progr...
DAA Course: • Design and Analysis of...
Placement Series: • Placements Series
Dynamic Programming: • Dynamic Programming
Operating Systems: // • Operating Systems
DBMS: • DBMS (Database Managem...
**********************************************
Connect & Contact Me:
Facebook: / jennys-lectures-csit-n...
Quora: www.quora.com/...
Instagram: / jayantikhatrilamba
#arrayoperationindatastructure
#arrayindatastructure
#datastructure
#UGCNETcoaching
#computerscience
#informationtechnology
#engineering
the unsorted array trick was genius, thank you ma'am.
For two months i have been trying to understand these concepts of data structure but failed every time my mid exams are coming right after two weeks and now i am here and completely got all these concepts thank you Mam i really appreciate your effort. In return i liked your videos and subscribed to your channel please continue your work for public welfare Thank you.
No sponser, no request for like & subscribe ❤
True dedication ❣️🙏🙏
Madam, I am from Somalia, as an IT student you helped me alot, the way you explain is super easy to understand, I am sure you have a deep knowledge of what you are Teaching and you know how to Teach. the way you explain is better than the way my University Teachers explain. LOVE AND RESPECT FROM SOMALIA. THANK YOU SO MUCH. keep on that Good work.
Mam , thank you so much for this playlist . We have no good faculties in my college of DATA STRUCTURES 🙏🙏🙏
her content are way more complete and updated than other channels.
Correction in program.
In the if else part the for loop condition should be.
for(i=0;i
Broo it's not right
Just make a dry run then you'll understand
@@AnuragRawat01 last element is not omitted because : a[i] = a[i+1] ----> a[i+1] is the last element .
Beauty with brain 😅
Your teaching makes me feel like I m an intelligent student😅
Me 2
simp
simp
Simp
Simp
Mam ...in the previous video u took size as 5 so that the index is 4...now in for loop u took size as 4( which is the index.)..if we take size as 5...then the for loop condition will change as size-2..is that so?
you are very beautiful mam
Padhai pr dhyan de bhai
Padhai pr dhyan de bhai
mam in this we didnt deleted the data from the last position , we just shifted and then only printing out size - - array. How can we actually vacant that memory ?
edited:
just put
arr[size-1]={ };
this will put a space and an array cant have space so system will put no value and you dont neeed to decrease the size of the array
Waahh...!! Thnx..
but still in place of a[size-1] ele are present that mean 0 (zero) are there and array does not free the memory so their is also no mean to initialize zero to last index
Had mam completed the topics of asymptotic notations, best case and worst case and time complexity??
U look beautiful ma'am
Focus on the subject bro...
Day 2nd 04/sept/2023
Mam kindly aap automata and compiler design subjects ka v video share karna..bohot hi patience k sathe and clearly aap topic ko explain karte hain..aur v videos share kijiyega mam plz..
The best explanation ever 👏👏
what about the last item??
mam when i am using (i=pos-1; i
Why we are using increment on (i) why not decrement?
thank you very much for creating this master piece this will help to years to years many students to learn DS,
everyone's thinks ds is complicated it is very hard to learn DS but you make it easy ,,,, your teaching way is very good . keep doing ma'am :)
Thank mam, very helpful and easy to understand concepts. cout
Ma'am why you write size- - after ending the program ...? I can't understand it properly .
Excellent course, very well explained and really simple.
Deletion operation in array code isn't working 🙂
Ask chatgpt by copy pasting your code. It can help find out errors. Mam has given correct program. You might have done some mistakes.
Thanks ma'am for giving this type of lecture.
Thanks, so clear and easy to follow here is a version of the code using dynamic memory allocation :
void delete(int *array, int *size,int pos){
for(int i = pos-1 ; i < *size-1 ; i++){
array[i] = array[i+1];
}
--(*size);
array = realloc(array,*size);
}
int main (int argc , char *argv[]) {
int size ;
printf("Enter the size of the array : ");
scanf("%d",&size);
int *array = malloc(sizeof(int)*size);
printf("Enter the elements of the array : ");
for(int i = 0 ; i < size ; i++){
scanf("%d",&array[i]);
}
int pos;
printf("Enter the position of the element that u want to delete : ");
scanf("%d",&pos);
delete(array,&size,pos);
for(int i = 0 ; i < size ; i++)
printf("%d\t",array[i]);
free(array);
return 0 ;
}
Hlo mam... is this playlist enough for cracking GATE cse...... can you plz answer me
first thanku so much mam for this series And
My code logic is:
int a[30],pos,size;
printf("enter the size of the array
");
scanf("%d",&size);
printf("Enter the element of array
");
for(int i=0;i
After seeing your last video
I am able to apply deletion operation by myself
Thank u mam🤗🔥
In the example a[i+1] copied to a[i]. But a[i+1] still have the value right ? Please any one help me in understanding this. Thanks!
Mam aapne 7:45 min. Pr jo less then and greater then bola vo aapne ulta bola h please mam check
one video on how to find time complexity pls mam
Mam kindly make videos on time complexity , binary and linear search , notations( theta(1), big O (1) )and worst and best time in DS🙏🙏🙏
It's a humble request mam
Thanks mam 😊
Why are you getting angry face Plz make one smile 😊😁😁While doing video
Mam that if(pos>=0)
||for(pos
Jenny Can you upload videos of core Java concepts for beginners (like me who don’t know abt computer science bt trying to learn)starting with basics. Eg: what is Class , object etc
So to delete the last element just put size - - ?
Thank you dany mam i AM finaly understand traversal, insertion and deletion in array by ur videos💥🎯💣
Please make some videos on STL for cpp codes in data structures. It will be very helpful for me.
Thank you so much ma'am. Your lectures are very easy to understand and to gain confidence.
Thanks a lot mam love from Pondicherry ♥️♥️♥️
For i =0; i > size -pos ; i++
A[pos-1+i]=A[pos+i];
Size --;
Is also posible ha
thank u mam for such a wonderful video!
I love you mam ❤❤
আপনাকে অনেক ভালো লাগে তাই আপনার ক্লাস করি ❤
Love you so much ❤
Thank you jenny🥰God bless you🙏🏾
In above code is not correct please check with this
#include
int main(){
int Array[10],size,pos=1;
printf("Enter Size of array: ");
scanf("%d",&size);
for(int i=0;i=pos;i--){
Array[i]=Array[i-1];
}
Array[pos]=99;
size++;
for(int i=0;i
Mam thanks for this informative lecture ..... when u will make video on tree sort ... plz mam .....❤❤❤❤
Bcoz of my busy schedule, I am not getting so much time nowadays.. but will try to upload it asap.. :)
Ok mam thanks..... mam 1 more thing .... heap sort me heapify tou ho jata hai but deletion me problem hota hai...plz agr ap bta skein tou...boht acha hoga..plz mam
Had mam completed the topics of asymptotic notations, best case and worst case and time complexity??
Thank you so much for your great teaching. Your explanation was very clear. I didn't have any idea of removing items from array.but after watching your video.i got a clear understanding of it.keep up the good work.
Mam Please Tell Me, What is the Difference Between ( a[i] = a[i+1] ) and ( a[i+1] = a[i] )
in programming code executes sequentially so sequence matters
Ma'am I want to correct your code by
#include
int main()
{
int a[100] = { 0 };
int i, x, pos, n;
// initialize array size
printf("Enter the Size of the Array : ");
scanf("%d",&n);
printf("Enter the Elements : ");
for (i = 0; i < n; i++)
scanf("%d",&a[i]);
for (i = 0; i < n; i++)
printf("%d ", a[i]);
printf("
");
//now insert the element
printf("Elementu want to insert is : ");
scanf("%d",&x);
// position
printf("Enter the pos : ");
scanf("%d",&pos);
n++;
for (i = n; i >= pos; i--)
a[i] = a[i-1];
a[pos - 1] = x;
// print
for (i = 0; i < n; i++)
printf("%d ", a[i]);
printf("
");
return 0;
Jenny, please do videos on some leetCode problem solving. Please explain Median of two sorted arrays
c++ u hv videos of data structure
Good afternoon mam , I am 2nd year of b.tech(IT) I joined college 2020 ,due to Covid class will run online soo I can not understand c language unfortunately I pass my 1 st semester then second semester exam also completed now I am 2 nd year now (Java)+(Data structures)+ DBMS class will run daily offline but I can't understand anything ##please give any suggestions mam#@ thank for your good explanation
mam , i think in for loop it should be like...
i
You are a gifted one, few only can be good speaker..and the audience understand everything...thank you so much di
I am addicted to your channel
Mistake:-
i should be inisilize in the top.
No doubt your teaching skills but you can boost your teaching by using hindi. English became an hindrance in your teaching.
You r using || or symbol in for loop mam.. Not or u have to use and symbol &&.. Otherwise everything is perfect
I cannot explain how much relief i got ...learning from your videos i respect your effort mam and thank you so much❤
Understandable 👍
Acha hai magar hindi english mix language karna tha
Asalam Alikom.
Thank you mam.
Your very w'll explain .From
Pakistan
Mam in the for loop does the first condition is to be evaluated after each iteration. forexample for(i=pos-1;.....;.....) so my point to ask is that after each iteration i=pos-1 needed to be evaluated. Am I right please guide me.
beautiful mam
4:15, how we delete
And ,size -1
Reduce the size of array
Is last , 5 consume storage?
is this program correct
//deleting an item from a position
for(int i=0;i
you can try using for(i=pos;i
you are using negative indices to store the elements
you are not code right
If(pos size )
Isme if and else dono statement chal rhi h ... Can solve anyone ...
mam i solved array questions in hackerank there iam unable to take upper bound of array size
To many ads
niceely explained mam
ma'am, i am doing Bsc CS hons. course, but it is a 3 year course in DU unlike other universities which offer 4 year honours course. 4 year research ugc are eligible for gates. Am i eligible too? please reply.
Hi Mam,
Good one. Although I want to suggest a point. I got confused when you said the time complexity is theta of N. Theta is actuallly average case complexity right? I think it should be Big O. which is the worst case complexity..
Delete = Position 0
50 100 42 12
0 1 2 3
1. A[0] = A[1]
100 100 42 12
0 1 2 3
2. A[1] = A[2]
100 42 42 12
0 1 2 3
3. A[2] = A[3]
100 42 12 12
0 1 2 3
4. A[3] = A[4] // Array index out of bounds..
In General
A[i] = A[i + 1]
Therefore, should loop through only till A[2] i.e. len(array) - 1
cute mam, makes me understand easily
love you mam😘😘😘😘
Mam end se delete karne k liye kya change karu?
Thankyou mam
Ma'am in all your data structure videos you not do practice code in your laptop like your c_programming videos and with out practically it is so difficult for foreign students to understand it
I know that money is important but the ads are constantly appearing on some important informative points in the video. This ruining the concentration....
Is this advance ds Or data structure
takan
no
taken
Some one know rawal college of Faridabad it's worst clz in the world.
Mam , if i don't use if condition my code is also running . It compulsory to use condition in this code or not?
mam how to do inserting , deleting traversing in sorted array mam .can you please tell me mam.is it different mam.please explain me mam.
Mam please make a vedio about addition of polynomials. In you tube there are some vedio about addition polynomials but can't understand. Please please make it fast mam
in the for loop when i=pos the code is properly run...
thank you ma'am...
❤
wonderful
Write a program to delete two elements after the occurrence of multiples of five. can you do a video on this
In this deletion code y u don't wrote the code free function for the delete element mam how it will delete the element
i have data structures in my mids, but without coding, i dont need the coding either, any suggestions on how i can watch your amazing videos??
Is that suitable for Lecturer examination syllabus
Thank u ma'am
Mam I have a Doubt. Can I ask you about that.Kindly tell me
Thanks Mam.. I love you mam....Superb Lecture...!
What to do when we have to delete data from the end????
a[pos-1]=a[size];
size--;
Is these videos on data structure and algorithm is using python
So helpful mam tqsm 🤩
🤗
Here I go...i found an army ....I'm soo happy that I'm not alone💜💜💜💜💜💜💜💜💜
mam aap hindi mai bhi explain kia karo
What if in case of unsorted array we put first index value into the the position that is to be deleted 🙄
But how will be the element deleted from array?
Position should be less than 0 not less than or equal if pos equals 0 i Will be -1