This video is unavailable.
Sorry about that.

Data Structures: Arrays vs Linked Lists

  • Published on Apr 2, 2013
  • See complete series on data structures here:
    In this lesson we will compare arrays with linked lists based on various parameters and understand the cost of various operations with these data structures.
    Lessons on big-oh notation can be found in these series on time complexity:

Comments • 162

  • stillFLiP
    stillFLiP Month ago

    So, linked lists are better the larger the data is, right? For example dealing with strings, specially if you need to add new ones at the start, i.e. todo list.

    • Peterolen
      Peterolen 6 days ago

      Some kind of array-based data structure is often best.

  • Mayukh Biswas
    Mayukh Biswas Month ago

    one doubt. If we store the start and end nodes in separate pointers, then adding a new element at the end should take O(1), shouldn't it?

  • Cindy Shi
    Cindy Shi Month ago

    So tremendously helpful. Thank you so much!

  • Fatima Kashif
    Fatima Kashif Month ago

    oop java pey karain ye program linklist k programs

  • Drumpf Cheeto
    Drumpf Cheeto Month ago


  • Abdelghani Draoui
    Abdelghani Draoui Month ago

    Awesome course thanks for sharing !

  • Alireza Ghodsipoor
    Alireza Ghodsipoor 3 months ago +4

    I can watch your videos as a movie and not get bored :) Awesome!

  • Ayeman Bin Salauddin
    Ayeman Bin Salauddin 3 months ago +1

    amazing, i am preparing for googles kickstart.
    btw im 15 and python programmer ,web developer.

  • ahmed zahid
    ahmed zahid 3 months ago

    Thanks sir well done job

  • Sakshi Soni
    Sakshi Soni 5 months ago +1

    Can someone tell me that these videos are helpful for the gate (for data structure) preparation or not?

  • Jakub Lorenc
    Jakub Lorenc 5 months ago

    i think deleting at the end of array is O(1), not O(n) so deleting times are not the same

  • Aritra Das
    Aritra Das 6 months ago +7

    The way you explain, I could listen to these videos for hours and not get bored. Absolutely mindblowing content man, keep doing the good work.

  • Belal Abdulnasser
    Belal Abdulnasser 8 months ago

    Good explanation, I think you have error at the point of adding item in the end and middle of linked list

  • Toufique Hasan
    Toufique Hasan 8 months ago

    Apne liKh rhe aur khud samj rhe ho

  • Ichinose Kai
    Ichinose Kai 8 months ago

    dude,you basically just saved me my whole semester studying with difficult lecture before,now all is ez

  • Nagalakshmi Duvvuri
    Nagalakshmi Duvvuri 9 months ago

    These are very helpful, Thanks so much for making the videos

  • AdiTya Dev
    AdiTya Dev 9 months ago


  • Amit Chhetri
    Amit Chhetri 9 months ago

    Why do we always write as
    Struct Node {
    int data;
    Node* next;
    and not as
    Struct Node {
    int data;
    int* next;
    What difference does this make?

    • Adarsh Todi
      Adarsh Todi 3 months ago

      (1)Node* next basically means a pointer next to a type of Struct Node.
      (2) int* next means a pointer next to a type int.
      The second implementation is completely wrong as we need a pointer to a next node(comprising of data and next pointer) and not an int type.

  • Samvit Agarwal
    Samvit Agarwal 9 months ago +1

    Hey this was a great video! Since I use Python, which uses dynamic arrays(arrayLists) by default, could you explain how exactly these work and the time/space complexity for these? Thanks

  • John Rhaenys
    John Rhaenys 10 months ago

    The time complexity to insert an element at the end of the linked list is O(n), since we only have the reference to the head and we have to traverse it until we get to the end of it. However, if we add another pointer that points to the last element of the list, the insertion at the end will be O(1), constant time. That being said, is it a good trade to use 4 more bytes to store the memory address of the last element and get a faster insertion?

  • Usama Iftikhar Butt
    Usama Iftikhar Butt 10 months ago

    thank u sir for such an amazing playlist

  • aditya verma
    aditya verma 10 months ago

    hi what about self referential pointers in a structure what amount of memory would they take?

  • Xavy Aly
    Xavy Aly 10 months ago

    can we get the same ppt in my mail id please:

  • KV M
    KV M 10 months ago

    Can't appreciate your videos enough. Following it religiously for my data structures journey. I have a question. seeing the comparision though, I don't see any good benefit of linked list at all. Mostly it is either comparable to arrays or it falls behind arrays and yeah, implementation is more time consuming and hard as well. Then why do we even use it? Just for one case of inserting at beginning where it scores better? Arrays are almost better or at par I mean! Sure we can compromise that one case. Memory these days should be not be an issue. So just why???

    • KV M
      KV M 10 months ago

      After my research, I feel very fine grain control over memory ( dynamic memory and implementation of stacks and queues ought to be the reason for it. Otherwise insertion and deletion are easy but have same time complexity.

    MURALI KRISHNA 11 months ago +2

    The way you are teaching is superb and do you have pdf version or any other format notes for quick revise.thanks...;

  • ronald abellano
    ronald abellano Year ago +5

    I dont get the Memory requirements part. How does Linked List consume lot less memory if it uses more memory because of its pointer?

  • ronald abellano
    ronald abellano Year ago

    Im confused. How does the array win over linked list in time complexity for accessing its elements?
    Linked List node uses its next pointer and how about array? How does array access its elements if Linked List always starts at the head?
    What are the operations for array if Linked List is Head links to next node? Head.Next

    • confidential303
      confidential303 3 months ago

      Array is simple, you know the size of an array.. if you want to read the 10th element, you just calculate begin memory address(200) + 10*(x bytes ..for int..we assume x=4)= 200 +40= so 10th element is at memory location 240.
      with linked list, you have to cycle through 10 times to get your memory address.., now the question is now the question is how long does 1 step take. In my opinion arrays wins almost in performance. since memory operations are slow..

  • Sambit Pati
    Sambit Pati Year ago

    please make videos on GATE entrance for computer science branch

  • Archit Atrey
    Archit Atrey Year ago

    Sir make a video on unrolled link lists

  • Youyi Liu
    Youyi Liu Year ago

    NEW BOOK: The Art of War by Sun Tzu, the first copy in the world to have those ancient words correctly reflected. Read it and get the job done!
    Chinese-English version

  • Akhil Jain
    Akhil Jain Year ago

    These videos are really helpful. You are doing a great job.!!!!! Please keep making more such videos.

  • Ashwin Karthikeyan

    All these videos on data structures are very useful. Thanks a lot. But can you upload videos of OOP using JAVA too please.

  • saurav yadav
    saurav yadav Year ago +1

    Your videoes are great. very useful for weak students like me .

  • Yashkirat Singh
    Yashkirat Singh Year ago

    When insetring an element at the end of a linked list why we will be needed to traverse whole memory.
    It can be done by changing the last pointer.

  • Aqib Mulla
    Aqib Mulla Year ago

    Hello bro plz remove that text when u speak it's not visible to us to note it down .

    • Tirth Patel
      Tirth Patel Month ago

      It's captions, u can turn it off from options.

  • Arghyadip chakraborty

    Sir please remove subtitles ..with the subtleties it's more difficult to read what you are writing at the time of teaching.

  • Sanket Ray
    Sanket Ray Year ago

    I have question....I dont really understand what he says regarding Arrays. He says that Arrays have a fixed length and we need to specify them in the beginning? I use Swift to code. We don't specify number of elements while initializing. Array can be initially empty and you can perform any logic you want. Am I missing something? Someone please clarify :(

    • Sanket Ray
      Sanket Ray Year ago

      oh...thanks for answering

      ANKUR SATYA Year ago

      The arrays referred to in the above video is the data type as used in C++. Different languages may have different data types. The data type you are referring to in Swift is also present in C++ but under the name "Vector".

  • Shivraj Sharma
    Shivraj Sharma Year ago

    4:10 ....why the time complexity in avg case is given as n instead of n/2

    • Peterolen
      Peterolen Year ago

      Constant factors are ignored so O(n/2) = O(n)

    • John
      John Year ago

      Worst case scenario. Also, 1/2 becomes insignificant. I think

  • Dhruv garg
    Dhruv garg Year ago

    awesome!! really well explained, but what about dynamic array or vector in c++

  • Larissa Ford
    Larissa Ford Year ago

    I thought arrays had O(n) and not O(1)? because isn't big-O concerned with worst case scenarios where we may have to iterate through the entire array before finding our element, and would thus need n-time for an array of size n? I thought this because I understood hash tables to be special because they had a faster run-time than arrays, having a general case of O(1) run-time. Am I mistaken somewhere in there? Thanks for the amazing lecture!

    • Larissa Ford
      Larissa Ford Year ago +4

      oh wait, it would be constant time if we knew ahead of time where in the array (which index) an element is found. I think my question is still valid in terms of finding an element, but is that not what big-O is concerned with? is big-O concerned only with look up for a particular known element?
      *EDIT* gosh, I missed the part that said "Cost of accessing an element". this all makes sense now.

  • Ans. Arshad
    Ans. Arshad Year ago

    Excellent explaination....!!! *Sir I have a question. How can the time complexity be same for adding an element in an array in beginning and adding in the middle ? I mean adding in beginning cause the shift of all array elements while adding in the middle results in shift of next half elements of array ? Thanks*

    • Saurav Bhagat
      Saurav Bhagat Year ago

      The time complexity of these 2 operations is O(n) which tells that time taken will be linearly dependent on the input size i.e. n in it's worst case. So, consider both the cases in it's worse cases i.e. when you are inserting at beginning, you are shifting all array elements, this is it's worst case and when you are inserting at middle suppose there are no elements in left-hand side, then again you have to shift all array elements in right-hand side.
      Therefore asymptotically time complexity will be same for both the cases.
      If I'm wrong pls correct.

  • Suman Chakrabarti

    This is honestly better than watching the MIT presentations. Thank you!

  • Jayanth Ram K.V
    Jayanth Ram K.V Year ago +10

    Inserting node at end of linked list would be constant time if we have tail pointer!

    • Dillon Cote
      Dillon Cote 4 months ago

      @Nuril Ahmed Tail pointers are optional and can be made the same way as a head pointer. He just didnt use it in the video.

    • Nuril Ahmed
      Nuril Ahmed 4 months ago

      But why is there no tail pointer?

  • Jonathan H
    Jonathan H Year ago


  • Jaider Ariza
    Jaider Ariza Year ago

    The cost of inserting an element at the end 10:24 could be a constant O(1) if you use doubly linked list :)

  • Vishwjaeet Singh
    Vishwjaeet Singh Year ago +3

    mycodeschool you're the best

  • Venkataraghavan Yanamandram

    Thank you for the great explanation!! I'd a doubt on linked list, when we insert a data at the end of linked list or in between linked list the time consumption is proportional to O(n). I thought however we're going to add it and just have to change the address of last one O(1). but we've to iterate from the first to find the tail node address so it comes to O(n) am I right?

  • nikhil gaikwad
    nikhil gaikwad Year ago

    Nice explains

  • Ayush Gupta
    Ayush Gupta Year ago

    well explained

    KISHLAY SINGH 2 years ago

    is this is a movie if not then why hell hell is subtile here ..

    • Peter Fish
      Peter Fish Year ago +1

      So people can easily understand what he is saying. Some people are hearing impaired, and others struggle with his accent.

  • Abhijeet Saxena
    Abhijeet Saxena 2 years ago

    What's the time complexity of deletion at i'th position in a linked list?

  • vijay pawar
    vijay pawar 2 years ago

    awesome explanation

    SONALI PUROHIT 2 years ago

    Can you make a video on how to calculate address of 3-d array?

  • Radhieka Nagpal
    Radhieka Nagpal 2 years ago

    Easy to understand and quite precise in flow of learning. Amazed.

  • CYChou
    CYChou 2 years ago +2

    I now know why google hires bunches of Indian CS engineers...

  • Akshayarekha Subramaniyan

    srsly, i don't know your name and who you are but for now you are a god to me. thank you so much. i longed so badly for learning this, now i understood this

  • Varun Kamani
    Varun Kamani 2 years ago

    your channel is great..keep it up!

  • Abhishek Singh Jina
    Abhishek Singh Jina 2 years ago +2

    i did not understand that part that a link list will take less memory as compared to that of an array..
    please explain!!

    • Piyush Pahwa
      Piyush Pahwa Year ago +2

      In the case of complex high size data, the fact that you will use exactly as many memory blocks as you need in the linked list than in case of the array is dominating over the fact that each memory block in the linked list contains an extra variable (of type node*) of size 4 bytes(which is pretty less in comparison to size of complex data part).

  • Erik Cartman
    Erik Cartman 2 years ago

    this is so informative omg , thanks alot

  • Abhirami anbu
    Abhirami anbu 2 years ago

    address of an element in array should be (base+(n-1)*size of element ) if n>0
    for 0the element (base+n*size of element) . Am I correct?

  • suprija sirikonda
    suprija sirikonda 2 years ago

    Y is d complexity O(n) for deleting d element at d end of an array (when it is full) ?

  • Sohelur Rahman
    Sohelur Rahman 2 years ago

    best lecture.... thankas

    ELIMAR PINEDA 2 years ago

    thank you so much for you greattttttt work!!!!!

  • Ronald Daugherty
    Ronald Daugherty 2 years ago +91

    finally someone explaining this information like their talking to beginners not seasoned engineers

  • Pearl Standing
    Pearl Standing 2 years ago


  • Piyush Hibare
    Piyush Hibare 2 years ago +6

    excellent explaining

  • Bhavin Barot
    Bhavin Barot 2 years ago

    Excellent. Very simplified and easy to understand for first time learners as well.

  • nazirahmad saidzada
    nazirahmad saidzada 2 years ago

    Thanks a bundle

  • Rakshith Yashvanth
    Rakshith Yashvanth 2 years ago

    Great videos! Keep up the good work and Thank you!

  • Tareq Elgafy
    Tareq Elgafy 2 years ago

    great !
    Thank you

  • Mohammed Ayaz S
    Mohammed Ayaz S 3 years ago +56

    The next "Khan Academy" but this time from India.

    • Mohammed Fawaz
      Mohammed Fawaz 9 days ago

      @Danilo Marques Yea I saw it years ago, but I think that was his friend, not the one who speak in the video.

    • Danilo Marques
      Danilo Marques 9 days ago

      @Mohammed Fawaz go to they facebook and you'll see the post

    • Mohammed Fawaz
      Mohammed Fawaz 9 days ago

      @Danilo Marques He did't die, but a friend of him.

    • Danilo Marques
      Danilo Marques Month ago

      unfortunately, he died before achieve such a thing

    • Adarsh Todi
      Adarsh Todi 3 months ago


  • Mércio Filho
    Mércio Filho 3 years ago

    Very nice!

  • Sherman Hung
    Sherman Hung 3 years ago +2

    shouldn't linked lists consume more memory than arrays? in each node, there will be memory allocated for data AND the link, whereas in arrays, there will only be memory allocated for data.

    • Robo
      Robo 11 months ago

      Yeah but why would you ever have empty elements in a dynamic array.

    • Patrascu Lucian
      Patrascu Lucian Year ago +2

      - In an array you will always have empty unallocated memory
      - Let's assume that, in an array, we store big data of 16 bytes / element
      - if we have 10 empty elements in the array
      - 16*10 = 160 unallocated bytes in memory
      - In linked lists this will not be the case
      - We will have 20 bytes / element
      - the address of the next element is stored in an integer of 4 bytes
      - thus 16 bytes + 4 bytes
      - But we will never have unallocated memory. So it's an overall win for Linked Lists

    • Peterolen
      Peterolen 3 years ago +2

      It depends.
      To get good performance out of arrays we often allocate 1.5 or 2 times as much memory as we need each time we run out of memory (std::vector works like this). That means the array could in the worst case take up almost twice as much memory than are actually used.
      In a linked list each node has a pointer to the next node. A single linked list is a bit awkward to use so often a double linked list (such as std::list) is used so then you have an additional pointer pointing to the previous node. If the data has the same size as a pointer it means you are using three times as much memory than the actual data. It's actually a bit more than that because of padding and other memory overhead of the dynamic allocations. The memory overhead of linked list does not depend on the size of the object, only on the number of objects, so if you store very big objects in your list the memory overhead is relatively small.

    • Archana Harish
      Archana Harish 3 years ago +8

      +Sherman Hung
      Rightly said - he compares 7 elements on an array vs 4 elements on a linked list.

  • pawan negi
    pawan negi 3 years ago

    good explanation ...

  • Daniel Li
    Daniel Li 3 years ago +49

    nice layout and subtitles. I really like the video. very professional. keep it up :)

  • Abhineet Sinha
    Abhineet Sinha 3 years ago

    +mycodeschool Excellent tutorial ..helped me clearing the subject by studying overnight ! Thanks !! Keep making more videos !!

  • pankaj jha
    pankaj jha 3 years ago

    Thanks mycodeschool, no one ever explained concept like this.

  • bittertongue96
    bittertongue96 3 years ago

    Do a video on Memory allocation? :D

  • ashish mehrotra
    ashish mehrotra 3 years ago

    can you please post lssons on heaps and multiway trees..?

  • Amit Singh
    Amit Singh 3 years ago

    what exactly is a pointer variable ?? and we assign it 4 bytes...

    • master chef
      master chef 3 years ago

      +amit singh it's just a type of variable, that stores the "address" of any other variable. The number of bytes to store an address is 4..

  • Muhammed Hussein
    Muhammed Hussein 3 years ago +1

    why the time complexity for inserting an element at the end of linked list is O(n)
    i think it should be o(1) because we just make the Null to the inserted element then we add the address of the element of last element to the previous element !!
    and Thanks for these Awesome Videos

    • Muhammed Hussein
      Muhammed Hussein 3 years ago +1

      thanks for this awesome explanation :)

    • plemyk
      plemyk 3 years ago +7

      @Muhammed Hussein Because you need to start from the address of the head node to arrive subsequently to the exit node.We have no knowledge of the last node address,without first having been directed by the head.What you suggest is like trying to arrive to any destination on a map,but having no awareness of where you are.How can you arrive to your destination,if you have no point of reference.

  • Kubilay Yazoğlu
    Kubilay Yazoğlu 4 years ago

    At 10:13 when you're talking about adding an element at the end of a linked list, why do you have to traverse? Why don't you add a new node and point to that node?

    • Kubilay Yazoğlu
      Kubilay Yazoğlu 4 years ago

      @Daníel Jóhannsson Thank you.

    • Shreyas Gune
      Shreyas Gune 4 years ago

      @Daníel Jóhannsson And hence one must use doubly linked list.

    • Daníel Jóhannsson
      Daníel Jóhannsson 4 years ago +3

      @ThePositiev3x Becase when you are accessing a linked list you get access to the head node (the first node in the list) and if you want to append a node to the back of the list you have to move the current pointer to the last node, you could make a tmp pointer pointing to the head and then iterating through every node with a for or a while loop. Then once you have reached the last node you can create the new node and connect (link) them together

  • Mary O'Connor
    Mary O'Connor 4 years ago

    Thank you, excellent explanation of cost and memory use.

  • Sierra Bravo
    Sierra Bravo 4 years ago +17

    Wish you would make your videos in Java, nonetheless you are the best on TheXvid.

    • Konstantin Rebrov
      Konstantin Rebrov 10 months ago

      Java does not have pointers. How do you think a linked list would be implemented in Java?

    • Patrascu Lucian
      Patrascu Lucian Year ago

      Well, I guess different people have different learning style and pace.
      If I put derek on 2X speed it will be like a rap song for me

    • Creamapod Games
      Creamapod Games Year ago

      Are you sure because his videos are pretty slow? I normally turn it up to around 2X speed with how slow he goes sometimes

    • Patrascu Lucian
      Patrascu Lucian Year ago

      The person who knows the syntax without knowing data structures is a beginner on data structures.
      That's what I meant. Derek's videos are much better to watch after you learn the basics from other who teaches slower.
      Then, Derek's videos are going to be awesome, you will refresh your memory, practice and master it at a hell of a fast pace.

    • Creamapod Games
      Creamapod Games Year ago +2

      A beginner shouldn't be on data structures and algorithms anyway. They still have to learn basic syntax.

  • Shahid Qureshi
    Shahid Qureshi 4 years ago +2

    Why do we always write as
    Struct Node {
    int data;
    Node* next;
    and not as
    Struct Node {
    int data;
    int* next;
    What difference does this make?

    • Baskaran Baluchamy
      Baskaran Baluchamy 2 months ago

      Thx sharma...

    • Mohit Sharma
      Mohit Sharma 9 months ago +3

      The data type of a pointer is needed in two situations:
      A)Deferencing the pointer
      B)Pointer arithmetic
      The address always comes in 4 bytes when we dereference using (.) or (->) then we are referencing to a memory block of
      1)for Node* next - 8bytes( 4 bytes for int data + 4 bytes for pointer Node *) and in second case
      2)for int* next - 4bytes(only 4 bytes either for int data or int* and neglecting the other part)
      For eg: Consider we have Node A and a pointer to node ie Node *B
      then I want A->next = B ; // next pointer pointing to B node .
      If we use int* next then do you think it is possible without errors??
      So surely we will have issues in the above implementation.
      for more explanation see the below link :

    • manish rana
      manish rana 9 months ago

      @Mohit Sharma but we need that pointer just to store the address right, so int should work🤔🤔🤔

    • Mohit Sharma
      Mohit Sharma 9 months ago +8

      (1)Node* next basically means a pointer next to a type of Struct Node.
      (2) int* next means a pointer next to a type int.
      The second implementation is completely wrong as we need a pointer to a next node(comprising of data and next pointer) and not an int type.

    • manish rana
      manish rana 9 months ago

      i need that answer

  • Willson Mock
    Willson Mock 4 years ago +2

    another really great video - i love the way you teach and how clearly you explain the concepts. i find this useful even when i'm not trying to implement in C / C++

  • muhammad waqas
    muhammad waqas 4 years ago

    can i ask u when we are inserting a node in middle why time complexity remains O(n)
    it should become O(n/2). am i right???

    • kvs ganesh
      kvs ganesh 2 years ago not care about multiplicative constants in complexity analysis..

    • Akshay Kumar
      Akshay Kumar 2 years ago +3

      so it is proportional to n but we do not consider 2 as well cos it is a constant

    • Peterolen
      Peterolen 3 years ago

      Time complexity often gives a good picture of what you can expect when n gets large. For smaller values of n the hidden factors gets more important and sometimes a better time complexity doesn't give faster run time.

    • Flurt
      Flurt 4 years ago +5

      i just mentioned that we do not care about the multiplicative constants
      so, O(2n) or O(n/2) are all O(n)

    • Samy Nashabe
      Samy Nashabe 4 years ago

      @Antar Azri isn't it supposed to be O(2n) instead of O(n) ?

  • Shubham Aggarwal
    Shubham Aggarwal 4 years ago

    Which of these is correct?
    Struct Node {
    int data;
    Node* next;
    Struct node {
    int data;
    struct node *next;
    typedef struct node NODE;
    NODE *start;
    I also don't understand the second code well. Especially the last two lines. Help!

    • Adarsh Todi
      Adarsh Todi 3 months ago

      (1)Node* next basically means a pointer next to a type of Struct Node.
      (2) int* next means a pointer next to a type int.
      The second implementation is completely wrong as we need a pointer to a next node(comprising of data and next pointer) and not an int type.

    • muhammad waqas
      muhammad waqas 4 years ago

      in the 2nd part of code, we are defining 'struct' type variable 'node' as NODE, in reality node/NODE is not a variable but a datatype.
      and then creating a pointer named 'start' for that definition(NODE).
      * refers the variable start is a pointer of type NODE. thats all.

  • Shubham Dey
    Shubham Dey 4 years ago

    really awesome... knowing the things dosent matter much fr a teacher but explaning it does.. nd myschool did it...

  • Nicolas Constantinou
    Nicolas Constantinou 4 years ago

    thank you very much! perfectly described!

  • Abhrajyoti Kirtania
    Abhrajyoti Kirtania 4 years ago


  • rahil shah
    rahil shah 5 years ago

    For Link List, By keeping two pointers one for Head and another for Tail of the List, inserting Element at the End will also of O(1)....

  • Pranav Ganorkar
    Pranav Ganorkar 5 years ago +1

    Excellent Way of Explaining Programming Concepts... Great Work Sir !!!

  • Ankit Raj
    Ankit Raj 5 years ago

    Awesome !! What a way of EXPLAINING THINGS .... +LEGIT

  • Stephen
    Stephen 5 years ago +5

    Good videos, makes more sense than what was taught in my data structures course here in the U.S.

  • Nicholas Gonzalez
    Nicholas Gonzalez 5 years ago

    Thanks very good video!

  • sourabh dhadiwal
    sourabh dhadiwal 5 years ago

    Best lectures I could have seen..
    Regretting if I had got such lessons in my engineering schools :(

  • mycodeschool
    mycodeschool  5 years ago +10

    Hi Prasanth,
    Thanks for your kind words.
    We will first complete some of the existing playlists and then we will move to OOP concepts. We are building a mechanism to track video requests on our website. Anyway, for now, your request is in queue.

    • Michael Carroll
      Michael Carroll Year ago +1

      Time complexity is always the worst case scenario, which in this case is adding an element at the beginning of the array, requiring all elements to shift.

    • Ans. Arshad
      Ans. Arshad Year ago +1

      Excellent explaination *Sir I have a question. How can the time complexity be same for adding an element in an array in beginning and adding in the middle ? I mean adding in beginning cause the shift of all array elements while adding in the middle results in shift of next half elements of array ? Thanks*

  • Prashanth Iyer
    Prashanth Iyer 5 years ago +1

    Wonderful series of tutorials ..! only 10% of the videos in youtube makes sense and this is one of them. Good job mycodeschool. It would be good if you could cover some of the OOPS and virtual functions.

  • kuchifai payung
    kuchifai payung 6 years ago

    Thanks, that makes a lot of sense...also thanks for the prompt response!