ARRAYS ADVANTAGES & LIMITATIONS - DATA STRUCTURES

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello friends welcome back to our channel so in the previous session we have seen the introduction to data structures so in that we have seen the two different types of data structures one is a primitive data structures and the mountain two data structures so we have already seen the primitive data structures that is a primitive data types in C language now we will focus on non primitive data structures so in the novel primitive data structures also it is categorized into two categories right so one is nonlinear and the another one is linear so in the linear data structures we have seen that all the elements are organized in a sequential order so the best example for this linear data structure is Alice so arrays stacks queues linker lists all these comes under the linear data structures so in that we will see one by one into recession we will start with an ace so this is concept is already covered in our C language so so this will revise the concept of array so here the array is a collection of elements which of which is of similar data type right so so we can store a multiple number of elements under the same name that is called that we have seen in the previous sessions right so now here how the memory is organized for the arrangements so here the memory is occupied in a continuous manner right so the elements will be organized in a continuous memory locations and also there are different operations we can perform on arrays so first one whose so we have seen the basic operations that that can be performed on these data structures in the previous that is first one is like searching so we have already seen the searching algorithms on arrangement so in their searching we have covered the linear search and the binary search another one is sorting this is also a very important operation that can be performed on others so here also we have seen bubble sort right mid sort through search on sort right so there are different sort of techniques so those we have covered and then insertion that means insert inserting an element into an existing end this is also we have seen and the deletion so this is deleting an element from the existing end so this operation also we have seen see so all these are the basic operations that can be performed on data structures so I will provide the links of all these videos in the description right now we will see so I don't want to repeat everything just I will give you the links in the description section so that you just go through and you just follow that so after these are operations there is a sort of advantages and the limitations of using these arrays now we will see those advantages and disadvantages first we will go with the advantages so what are the advantages of using anis advantages of using errors so first one it consists of similar data elements so this is one of the advantages sorry it consists of similar data type elements so NFO files can be stored in a single name next so we can access any element so we can access any element in the Edit with the help of index man so with the help or UNIX man hey that's what we are using the index right so this is one of the advantages we can access any element any element based upon the index value we can return next it is suitable then the number of elements or already know so before applying the algorithm for before applying the application before using these arrays so we have to know the number of elements that these array can be used so then only this is suitable right next another major advantage is this is used in implementation of the other linear data structures like stacks and the queues not the list right so these are the simple assumed advantages over using these errors and there are also the limitations of using these apps see we will see the limitations what are the limitations so understand is this one advantageous similar data type elements and one advantage is random access so we can access any element from the array that is with the help of index value and where it is suitable whenever we know the number of elements that array should now if if we know that the number of elements then I think this is a foot next disadvantages disadvantages so there are a number of disadvantages over using this so first one is this is the major disadvantage of using errors static memory allocation static memory allocation that means during the compile time itself we have to specify the size of the array so at the compile time itself we have to specify the science of and there is no possibility to change the size of an array during the runtime right so the pins if the array is declared as a ten elements if there is declared developments there is no possible to increase the size it is not possible to increase the size and if the array is initialized with a more name of elements and if we are using only the ten elements if ten elements are used then memory of 90 elements is yes so if we declare array with the maximum size and if we are using only a few elements then the remaining elements the memory occupied for the remaining elements is wastage the memories wisdom so this is all about the static memory allocation because of static memory allocation so during the compile time itself with how to specify the size of the array during the runtime we can't modify the size of that right next the second drawback the second drawback is insertion and delusion this is the another drawback so in such inserting an element and the deletion of element is expensive expensive means it requires a more complex mean loops it involves syllable complex so we'll see if we use this insertion let us take G of 0 Y of 1 you have two we have three and the air for right so here if you insert an element let it be 10 20 30 40 and 50 and if you insert fine and here of 0 first of all we have to mean see you have zero yep one right ready bf5 first we have to move every element towards its right position so this enable should be moved this event should be moved here this element should be moved here this element and similarly the same so n will be moved here 20 30 40 50 and finally 5 should be inserted here so this is the process to return if you want to insert an element at the beginning so it is somewhat expensive it that it takes this some more time so in terms the expensive in terms means time taken time complexity right now coming to the deletion deletion right so this is all about insertion see right so if you do it em if you do em right should be the ten now see how to move everything towards its yeah we have to move everything towards its left so so 20 will be moved to F 0 30 will be moved to have 140 will be moved to you have to and similarly 50 will be moot we have three right we are not deleting the elements just we are moving the elements that is the main problem of Eros so we are not removing the memory space here the memory occupied by the fourth index and fifth index our mystic right so that is the main drawback of this annex so what is the static memory allocation another one is this insertion and deletion the wastage of memory is mu right and due to these disadvantages we are not implementing the list concept by using these errors so we will use the we will implement the list concept using the linked list right so hope you understood the advantages and disadvantages over this adits and once again I am saying that we have seen all the operations of arrays that means searching sorting insertion and deletion so I will provide the links of those videos in the description section just go through that and mainly these are the disadvantages saying everyone is just over address so we will stop here in the next session we will go with the implementation of linker list right so if you really understood my sessions like my sessions share my sessions and if you are having any doubts regarding this address concept feel free to post your doubts in the comment section so that definitely I will try to clarify all your notes and don't forget to subscribe to our Channel thanks for listening thank you very much
Info
Channel: Sundeep Saradhi Kanthety
Views: 163,069
Rating: 4.9397593 out of 5
Keywords: sundeep, saradhi, kanthety, data structures, fundamentals, basics, arrays, lists, linked lists, stacks, queues, trees, graphs, searching, sorting, insertion, deletion, operations on data structures, primitive, non primitive, linear, non linear, binary trees, binary search trees, ADVANTAGES OF ARRAYS, LIMITATIONS OF ARRAYS
Id: x7t_-ULoAZM
Channel Id: undefined
Length: 13min 5sec (785 seconds)
Published: Thu May 09 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.