Java LinkedList
Arun M
[{'start': '0.800', 'end': '5.600', 'text': 'hello and welcome In this video\xa0\nwe are discussing about a Java'}, {'start': '5.600', 'end': '13.360', 'text': 'linked list So you learned about array\xa0\nlist and the link list class is almost'}, {'start': '13.360', 'end': '20.240', 'text': 'identical to array list Import the\xa0\nlinked list class Import java.util'}, {'start': '20.240', 'end': '29.280', 'text': 'Link list public class main public static void\xa0\nmain string args linked list string cars equal'}, {'start': '29.280', 'end': '41.920', 'text': 'to new linked list string cars dot add Volvo cars\xa0\ndot add BMW cars do add Ford system out dot print'}, {'start': '41.920', 'end': '55.840', 'text': 'cars array list versus linked list The linked\xa0\nlist class has a collection which can contain'}, {'start': '55.840', 'end': '64.640', 'text': 'many objects of the same type Just like\xa0\nthe array list the linked list class has'}, {'start': '64.640', 'end': '74.320', 'text': 'all of the same methods as the array list class\xa0\nbecause they both implement the list interface'}, {'start': '75.360', 'end': '82.480', 'text': 'This means that you can add items change items\xa0\nremove items and clear the list in the same way'}, {'start': '82.480', 'end': '88.640', 'text': 'However while the array list class and the linked\xa0\nlist class can be used in the same way they are'}, {'start': '88.640', 'end': '99.840', 'text': 'built very differently How the array list works\xa0\nthe array list class has a regular array inside it'}, {'start': '100.560', 'end': '110.960', 'text': 'So when an element is added it is placed into the\xa0\narray and if the array is not big enough a new'}, {'start': '110.960', 'end': '124.080', 'text': 'larger array is created to replace the old one and\xa0\nthe old one is removed How the linked list works'}, {'start': '124.080', 'end': '132.160', 'text': 'the linked list stores its items in containers The\xa0\nlist has a link to the first container and each'}, {'start': '132.160', 'end': '138.800', 'text': 'container has a link to the next container in the\xa0\nlist To add an element to the list the element is'}, {'start': '138.800', 'end': '147.440', 'text': 'placed into a new container and that container is\xa0\nlinked to one of the other containers in the list'}, {'start': '148.640', 'end': '155.040', 'text': 'When to use use an array list for storing and\xa0\naccessing data and linked list to manipulate'}, {'start': '155.040', 'end': '166.240', 'text': 'data LinkedI methods for many cases array list\xa0\nis more efficient as it is common to need access'}, {'start': '166.240', 'end': '172.640', 'text': 'to random items in the list But the link list\xa0\nprovides several methods to do certain operations'}, {'start': '172.640', 'end': '180.800', 'text': 'more efficiently method add first adds an item to\xa0\nthe beginning of the list Add last add an item to'}, {'start': '180.800', 'end': '188.000', 'text': 'the end of the list Remove first remove an item\xa0\nfrom the beginning of the list Remove last remove'}, {'start': '188.000', 'end': '195.040', 'text': 'an item from the end of the list Get first get\xa0\nthe item at the beginning of the list Get last'}, {'start': '195.040', 'end': '203.920', 'text': 'get the item at the end of the list So this was\xa0\na brief discussion on linked list in Java and'}, {'start': '203.920', 'end': '212.320', 'text': "we'll be discussing more on Java in the upcoming\xa0\nvideos Thanks for watching this video Bye for now"}]