title: Time Complexity while deleting last element from arraylist and linkedlist
body: <p>1st Part :-</p>
  
  <p>I was reading in the book - "Data Structure and Algorithms made easy in Java" that the time complexity for deleting the last element from Linkedlist and Arraylist is O(n). But the Linkedlist internally implements DoublyLinkedlist so the time complexity should be O(1) and similarly for Arraylist as it internally implement Array it should be O(1).</p>
  
  <p>2nd Part :-</p>
  
  <p>It also says that the insertion of an element at the ending of a linkedlist has a time complexity of O(n) but the linkedlist maintains pointers both at the end and at the front. So it this statement correct ? Moreover it says that the time complexity to insert an element in an arraylist at the end is O(1) if array is not full and O(n) if the array is full. Why O(n) if the array is full ? </p>
  
  <p>Thanks for answering the 1st part . Can anyone please also explain the 2nd part. Thanks :)</p>