answersLogoWhite

0

Yes, a linked list can be implemented in an array. Instead of pointers (or references in JAVA) you can use element indexes in the "next" and "last" items.

This does not stop you from using pointers or references. They still work. You can take the address of an element of an array, such as &a[217], and place that in the .next or .last pointers, and manage the relationships in the normal way. Using an array is simply one way to manage memory.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What is meant by doubly linked list?

In C programming, a double linked-list refers to a linked data structure that contains a set of links that have been linked sequentially.


Why is C used in OS level programming?

For programming only in ASM is too hard and the OS is in fact at some places that can be programmed by C linked to ASM.


What is meant by enum in C programming?

The enum keyword means enumeration.


What the answer of give 5 programming language influence by c language?

It would be a list of five programming languages.


32 can you create a linked list with out structure pointer?

Not in C, no.


Write a algorithm for doubly linked list in c?

sorry


What is linked list in C langauage?

A linked list is a collection of items, often nodes, that are sequentially linked by some kind of index or pointer contained within each item.


Which of the following data structures can be randomly accessed giving loc A. linked list implemented using array B. singly linked list C. double linked list D. both single and double linked list?

Which of the following data structures can be randomly accessed giving loc?A. linked list implemented using arrayB. singly linked listC. double linked listD. both single and double linked listThe answer is A.


Why does c do not accept the?

"the" is not a keyword in the C Programming Language. Perhaps you meant "const" HTH Richard Wolf Software Architect


Write a program in C to create a Circular Linked list?

#include<iostream.h>


Disadvantages of linked lists in c?

Because the C programming language leaves the responsibility for memory allocation and pointers entirely with the programmer, the disadvantage of linked lists over some other linear data structures (such as arrays) is that the bear a risk or memory leaks and invalid pointers. The fact that the size of a linked list is generally not deterministic is also commonly viewed a disadvantage over statically linked linear containers (e.g. arrays) in some systems, primarily in embedded systems. Compared to containers of higher order (such as trees or hash tables), search operations in a linked list are generally slower. Compared to a double linked list, removal and insertion of items (except head and tail) is generally more expensive.


Write about template programming in c plusplus?

Template programming in C++ is the technique of writing a class that handles arbitrary data types instead of specific data types. For instance, if you had a class that implemented a linked list of integers (int), and you wanted a linked list of floating points (double), you would need to clone the class implementation of list-int and make it list-double, and you would need to modify all the places in the class that pertain to int and change it to double. Templates, on the other hand, allow you to implement a generic class, say a linked list of <type-t>. Then, when you declare a linked list of double, the compiler creates the class and replaces all <type-t> with double. For this to work correctly, the list portion of the class must be able to reliably perform whatever tests it might need on the type portion of the class without knowing anything about that type. This generally means that all possible relational operators have to be overloaded as needed.