{"id":4737,"date":"2022-08-17T11:25:22","date_gmt":"2022-08-17T11:25:22","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=4737"},"modified":"2022-08-17T11:25:22","modified_gmt":"2022-08-17T11:25:22","slug":"what-is-the-difference-between-linked-lists-and-arrays","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/","title":{"rendered":"What is the difference between Linked Lists and Arrays ?"},"content":{"rendered":"<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"50%\"><strong>\u00a0<\/strong><\/p>\n<h3 id=\"array\" style=\"text-align: center;\"><strong>\u00a0Array<\/strong><\/h3>\n<\/td>\n<td width=\"50%\"><strong>\u00a0<\/strong><\/p>\n<h3 id=\"linked-lists\"><strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Linked Lists<\/strong><\/h3>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"360\">A data structure consisting of a collection of elements each identified by the array index<\/td>\n<td width=\"364\">A linear collection of data elements whose order is not given by their location in memory<\/td>\n<\/tr>\n<tr>\n<td width=\"360\">It supports random access, so the programmer can directly access an element in the array using the index<\/td>\n<td width=\"364\">It supports sequential access, so the programmer has to sequentially go through each element or node until reaching the required element<\/td>\n<\/tr>\n<tr>\n<td width=\"360\">Elements are stored in contiguous memory location<\/td>\n<td width=\"364\">Elements can be stored anywhere in the memory<\/td>\n<\/tr>\n<tr>\n<td width=\"360\">Programmer has to specify the size of the array at the time of declaring the array<\/td>\n<td width=\"364\">There is no need for specifying the size of a linked list<\/td>\n<\/tr>\n<tr>\n<td width=\"360\">Memory allocation happens at compile time<\/td>\n<td width=\"364\">Memory allocation happens at run time<\/td>\n<\/tr>\n<tr>\n<td width=\"360\">It is a static memory allocation<\/td>\n<td width=\"364\">It is a dynamic memory allocation<\/td>\n<\/tr>\n<tr>\n<td width=\"360\">Elements are independent of each other<\/td>\n<td width=\"364\">An element or node points to the next bode or both next node and previous node<\/td>\n<\/tr>\n<tr>\n<td width=\"360\">Size of an array is fixed<\/td>\n<td width=\"364\">Size of an array is not fixed<\/td>\n<\/tr>\n<tr>\n<td width=\"360\">Array elements can be modified easily by identifying the index value<\/td>\n<td width=\"364\">Linked list is a complex process for modify node in a linked list<\/td>\n<\/tr>\n<tr>\n<td width=\"360\">Array elements cannot be added deleted once it is declared<\/td>\n<td width=\"364\">Nodes in the linked list can be added and deleted from the list<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\">\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0Array \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Linked Lists A data structure consisting of a collection of elements each identified by the array index A linear collection of data elements whose order is not given by their location in memory It supports random access, so the programmer can directly access an element in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5608],"tags":[18291,18290,3539,18289,3523,18286,18285,3423,18288,18287,18292],"class_list":["post-4737","post","type-post","status-publish","format-standard","hentry","category-python","tag-are-arrays-faster-than-lists","tag-array-and-linked-lists","tag-array-vs-linked-list","tag-array-vs-linked-list-time-complexity","tag-difference-between-array-and-linked-list","tag-difference-between-linked-list-and-arrays","tag-linked-list-vs-array","tag-types-of-linked-list","tag-what-is-linked-list","tag-what-is-the-difference-between-array-and-linked-list","tag-why-linked-lists-are-better-than-arrays"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is the difference between Linked Lists and Arrays ? - Wikitechy<\/title>\n<meta name=\"description\" content=\"What is the difference between Linked Lists and Arrays ? - A data structure consisting of a collection of elements each identified by the array index\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the difference between Linked Lists and Arrays ? - Wikitechy\" \/>\n<meta property=\"og:description\" content=\"What is the difference between Linked Lists and Arrays ? - A data structure consisting of a collection of elements each identified by the array index\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-17T11:25:22+00:00\" \/>\n<meta name=\"author\" content=\"webmaster\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webmaster\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-the-difference-between-linked-lists-and-arrays\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-the-difference-between-linked-lists-and-arrays\\\/\"},\"author\":{\"name\":\"webmaster\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/f785ba3ecc599133e65ab6138042a3e4\"},\"headline\":\"What is the difference between Linked Lists and Arrays ?\",\"datePublished\":\"2022-08-17T11:25:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-the-difference-between-linked-lists-and-arrays\\\/\"},\"wordCount\":231,\"commentCount\":0,\"keywords\":[\"are arrays faster than lists\",\"array and linked lists\",\"array vs linked list\",\"array vs linked list time complexity\",\"difference between array and linked list\",\"difference between linked list and arrays\",\"linked list vs array\",\"types of linked list\",\"what is linked list\",\"what is the difference between array and linked list\",\"why linked lists are better than arrays\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-the-difference-between-linked-lists-and-arrays\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-the-difference-between-linked-lists-and-arrays\\\/\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-the-difference-between-linked-lists-and-arrays\\\/\",\"name\":\"What is the difference between Linked Lists and Arrays ? - Wikitechy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\"},\"datePublished\":\"2022-08-17T11:25:22+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/f785ba3ecc599133e65ab6138042a3e4\"},\"description\":\"What is the difference between Linked Lists and Arrays ? - A data structure consisting of a collection of elements each identified by the array index\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/python\\\/what-is-the-difference-between-linked-lists-and-arrays\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/f785ba3ecc599133e65ab6138042a3e4\",\"name\":\"webmaster\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"caption\":\"webmaster\"},\"sameAs\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\"],\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/author\\\/webmaster\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is the difference between Linked Lists and Arrays ? - Wikitechy","description":"What is the difference between Linked Lists and Arrays ? - A data structure consisting of a collection of elements each identified by the array index","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/","og_locale":"en_US","og_type":"article","og_title":"What is the difference between Linked Lists and Arrays ? - Wikitechy","og_description":"What is the difference between Linked Lists and Arrays ? - A data structure consisting of a collection of elements each identified by the array index","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/","og_site_name":"Wikitechy","article_published_time":"2022-08-17T11:25:22+00:00","author":"webmaster","twitter_card":"summary_large_image","twitter_misc":{"Written by":"webmaster","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/#article","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/"},"author":{"name":"webmaster","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"headline":"What is the difference between Linked Lists and Arrays ?","datePublished":"2022-08-17T11:25:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/"},"wordCount":231,"commentCount":0,"keywords":["are arrays faster than lists","array and linked lists","array vs linked list","array vs linked list time complexity","difference between array and linked list","difference between linked list and arrays","linked list vs array","types of linked list","what is linked list","what is the difference between array and linked list","why linked lists are better than arrays"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/","name":"What is the difference between Linked Lists and Arrays ? - Wikitechy","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"datePublished":"2022-08-17T11:25:22+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"description":"What is the difference between Linked Lists and Arrays ? - A data structure consisting of a collection of elements each identified by the array index","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/python\/what-is-the-difference-between-linked-lists-and-arrays\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4","name":"webmaster","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","caption":"webmaster"},"sameAs":["https:\/\/www.wikitechy.com\/interview-questions"],"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=4737"}],"version-history":[{"count":1,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4737\/revisions"}],"predecessor-version":[{"id":4738,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4737\/revisions\/4738"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=4737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=4737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=4737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}