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

КОМЕНТАРІ • 266

  • @abhiavasthi624
    @abhiavasthi624 4 роки тому +65

    the unsorted array trick was genius, thank you ma'am.

  • @abdullahyounas6470
    @abdullahyounas6470 4 роки тому +141

    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.

  • @anonymouussssss
    @anonymouussssss Рік тому +14

    No sponser, no request for like & subscribe ❤
    True dedication ❣️🙏🙏

  • @wardoonacademy
    @wardoonacademy 4 роки тому +18

    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.

  • @ShubhamSingh-cd1jf
    @ShubhamSingh-cd1jf 3 роки тому +18

    Mam , thank you so much for this playlist . We have no good faculties in my college of DATA STRUCTURES 🙏🙏🙏

  • @piyushkumar-jw8eb
    @piyushkumar-jw8eb 4 роки тому +30

    her content are way more complete and updated than other channels.

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

    Correction in program.
    In the if else part the for loop condition should be.
    for(i=0;i

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

      Broo it's not right
      Just make a dry run then you'll understand

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

      @@AnuragRawat01 last element is not omitted because : a[i] = a[i+1] ----> a[i+1] is the last element .

  • @PROTECHRAHUL
    @PROTECHRAHUL 4 роки тому +24

    Beauty with brain 😅
    Your teaching makes me feel like I m an intelligent student😅

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

    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?

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

    you are very beautiful mam

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

    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

    • @sm-op9zg
      @sm-op9zg 3 роки тому

      Waahh...!! Thnx..

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

      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

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

      Had mam completed the topics of asymptotic notations, best case and worst case and time complexity??

  • @kiranchandu2174
    @kiranchandu2174 5 років тому +11

    U look beautiful ma'am

    • @Vijay-cz7pe
      @Vijay-cz7pe 4 роки тому +2

      Focus on the subject bro...

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

    Day 2nd 04/sept/2023

  • @lubuzlife
    @lubuzlife 5 років тому +5

    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..

  • @kcalls4992
    @kcalls4992 4 роки тому +7

    The best explanation ever 👏👏

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

    what about the last item??

  • @amanavengeraman
    @amanavengeraman 5 років тому +2

    mam when i am using (i=pos-1; i

    • @sunilverma-ry8yn
      @sunilverma-ry8yn 4 роки тому

      Why we are using increment on (i) why not decrement?

  • @mukulverma9966
    @mukulverma9966 Рік тому +3

    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 :)

  • @MySirGee
    @MySirGee 3 роки тому +1

    Thank mam, very helpful and easy to understand concepts. cout

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

    Ma'am why you write size- - after ending the program ...? I can't understand it properly .

  • @smileplease2349
    @smileplease2349 4 роки тому +5

    Excellent course, very well explained and really simple.

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

    Deletion operation in array code isn't working 🙂

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

      Ask chatgpt by copy pasting your code. It can help find out errors. Mam has given correct program. You might have done some mistakes.

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

    Thanks ma'am for giving this type of lecture.

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

    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 ;
    }

  • @birdgold2177
    @birdgold2177 4 роки тому +1

    Hlo mam... is this playlist enough for cracking GATE cse...... can you plz answer me

  • @vgk-lm8vl
    @vgk-lm8vl Рік тому +1

    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

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

    After seeing your last video
    I am able to apply deletion operation by myself
    Thank u mam🤗🔥

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

    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!

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

    Mam aapne 7:45 min. Pr jo less then and greater then bola vo aapne ulta bola h please mam check

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

    one video on how to find time complexity pls mam

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

    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

  • @VinodThakurGaming
    @VinodThakurGaming 5 років тому +3

    Thanks mam 😊

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

    Why are you getting angry face Plz make one smile 😊😁😁While doing video

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

    Mam that if(pos>=0)
    ||for(pos

  • @karanshankar6705
    @karanshankar6705 4 роки тому +14

    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

  • @Deoxys_da2
    @Deoxys_da2 3 місяці тому +1

    So to delete the last element just put size - - ?

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

    Thank you dany mam i AM finaly understand traversal, insertion and deletion in array by ur videos💥🎯💣

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

    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.

  • @mohanraj-zp3kc
    @mohanraj-zp3kc 4 роки тому +1

    Thanks a lot mam love from Pondicherry ♥️♥️♥️

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

    For i =0; i > size -pos ; i++
    A[pos-1+i]=A[pos+i];
    Size --;
    Is also posible ha

  • @smoothierudiee
    @smoothierudiee 16 днів тому

    thank u mam for such a wonderful video!

  • @Rifat-nj3nl
    @Rifat-nj3nl Рік тому

    I love you mam ❤❤
    আপনাকে অনেক ভালো লাগে তাই আপনার ক্লাস করি ❤
    Love you so much ❤

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

    Thank you jenny🥰God bless you🙏🏾

  • @JaisaiEducation-i3g
    @JaisaiEducation-i3g Місяць тому

    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

  • @adreesmughaladreesmughal3876
    @adreesmughaladreesmughal3876 5 років тому +3

    Mam thanks for this informative lecture ..... when u will make video on tree sort ... plz mam .....❤❤❤❤

    • @JennyslecturesCSIT
      @JennyslecturesCSIT  5 років тому +3

      Bcoz of my busy schedule, I am not getting so much time nowadays.. but will try to upload it asap.. :)

    • @adreesmughaladreesmughal3876
      @adreesmughaladreesmughal3876 5 років тому +1

      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

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

      Had mam completed the topics of asymptotic notations, best case and worst case and time complexity??

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

    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.

  • @Rahul-ur6xz
    @Rahul-ur6xz 2 роки тому

    Mam Please Tell Me, What is the Difference Between ( a[i] = a[i+1] ) and ( a[i+1] = a[i] )

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

      in programming code executes sequentially so sequence matters

  • @the.darkcomet
    @the.darkcomet 4 роки тому

    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;

  • @prithvini04
    @prithvini04 4 роки тому +1

    Jenny, please do videos on some leetCode problem solving. Please explain Median of two sorted arrays

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

    c++ u hv videos of data structure

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

    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

  • @Mohitsingh-lk7ez
    @Mohitsingh-lk7ez Рік тому

    mam , i think in for loop it should be like...
    i

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

    You are a gifted one, few only can be good speaker..and the audience understand everything...thank you so much di

  • @cgi7543
    @cgi7543 3 роки тому +1

    I am addicted to your channel

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

    Mistake:-
    i should be inisilize in the top.

  • @ram_bhakt_99699
    @ram_bhakt_99699 8 місяців тому +1

    No doubt your teaching skills but you can boost your teaching by using hindi. English became an hindrance in your teaching.

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

    You r using || or symbol in for loop mam.. Not or u have to use and symbol &&.. Otherwise everything is perfect

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

    I cannot explain how much relief i got ...learning from your videos i respect your effort mam and thank you so much❤

  • @sarveshrs23
    @sarveshrs23 11 днів тому

    Understandable 👍

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

    Acha hai magar hindi english mix language karna tha

  • @AbdulSalam-de1ew
    @AbdulSalam-de1ew 3 роки тому

    Asalam Alikom.
    Thank you mam.
    Your very w'll explain .From
    Pakistan

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

    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.

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

    beautiful mam

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

    4:15, how we delete
    And ,size -1
    Reduce the size of array
    Is last , 5 consume storage?

  • @subhashmurugesan5442
    @subhashmurugesan5442 4 роки тому +1

    is this program correct
    //deleting an item from a position
    for(int i=0;i

    • @raxsuv1270
      @raxsuv1270 4 роки тому

      you can try using for(i=pos;i

    • @Pooh__7__
      @Pooh__7__ 4 роки тому

      you are using negative indices to store the elements

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

      you are not code right

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

    If(pos size )
    Isme if and else dono statement chal rhi h ... Can solve anyone ...

  • @etyalarahul8511
    @etyalarahul8511 7 місяців тому

    mam i solved array questions in hackerank there iam unable to take upper bound of array size

  • @HS-in3kq
    @HS-in3kq 4 роки тому +1

    To many ads

  • @samarthgupta5132
    @samarthgupta5132 4 роки тому +1

    niceely explained mam

  • @jagritiyadavv
    @jagritiyadavv 4 роки тому

    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.

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

    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

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

    cute mam, makes me understand easily

  • @chandrasekharkasukurthi7311
    @chandrasekharkasukurthi7311 28 днів тому

    love you mam😘😘😘😘

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

    Mam end se delete karne k liye kya change karu?

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

    Thankyou mam

  • @python-2023
    @python-2023 2 роки тому

    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

  • @V-vek12
    @V-vek12 3 роки тому

    I know that money is important but the ads are constantly appearing on some important informative points in the video. This ruining the concentration....

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

    Is this advance ds Or data structure

  • @kr._raushan
    @kr._raushan 2 роки тому

    takan
    no
    taken

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

    Some one know rawal college of Faridabad it's worst clz in the world.

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

    Mam , if i don't use if condition my code is also running . It compulsory to use condition in this code or not?

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

    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.

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

    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

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

    in the for loop when i=pos the code is properly run...
    thank you ma'am...

  • @Akshaysajeevan-k8m
    @Akshaysajeevan-k8m 6 місяців тому

  • @SharvanKumar-ui1kw
    @SharvanKumar-ui1kw 4 роки тому +1

    wonderful

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

    Write a program to delete two elements after the occurrence of multiples of five. can you do a video on this

  • @SanapalaLeela
    @SanapalaLeela 6 місяців тому

    In this deletion code y u don't wrote the code free function for the delete element mam how it will delete the element

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

    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??

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

    Is that suitable for Lecturer examination syllabus

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

    Thank u ma'am

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

    Mam I have a Doubt. Can I ask you about that.Kindly tell me

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

    Thanks Mam.. I love you mam....Superb Lecture...!

  • @mohitmehra3133
    @mohitmehra3133 3 роки тому +1

    What to do when we have to delete data from the end????

  • @j.charles4205
    @j.charles4205 Рік тому

    Is these videos on data structure and algorithm is using python

  • @Isha7558
    @Isha7558 5 років тому +3

    So helpful mam tqsm 🤩

    • @Isha7558
      @Isha7558 5 років тому

      🤗

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

      Here I go...i found an army ....I'm soo happy that I'm not alone💜💜💜💜💜💜💜💜💜

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

    mam aap hindi mai bhi explain kia karo

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

    What if in case of unsorted array we put first index value into the the position that is to be deleted 🙄

  • @piyushpanjwani5625
    @piyushpanjwani5625 4 роки тому

    But how will be the element deleted from array?

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

    Position should be less than 0 not less than or equal if pos equals 0 i Will be -1