answersLogoWhite

0


Best Answer

The main operations on singly linked list are:

1:-Insertion

2:-Deletion

3:-Searching

4:-Display

Insertion can be done in done ways:

1)Insertion at beginning

2)Insertion at end

3)Inserting at a specified position

Deletion can be performed in 3 ways:

1)Deletion from beginning

2)Deletion from end

3)Deletion from a specified position.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

The operations that can be performed on a linked list are... 1. Insert an element or list. 2. Delete an element or list. 3. Read an element or list. 4. Modify an element or list. 5. Search for the first or next occurence of an element.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Operations that are performed on a singly linked list are-

1. Traversal of complete list (Displaying all data elements)

2. Insertion of element at beginning.

3. Insertion of element at end.

4. Insertion of element at specified position.

5. Deletion of element from beginning.

6. Deletion of element from end.

7. Deletion of element from specified position.

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

The constant time operations that may be performed upon a doubly-linked list are:

  • .back()
  • .empty()
  • .front()
  • .pop_back()
  • .pop_front()
  • .push_back()
  • .push_front()

Doubly-linked lists can also be move constructed in constant time as well as default constructed in constant time (creating an empty list). Empty lists can also be copy constructed, copy assigned and destroyed in constant time.

Note that lists (including empty lists) cannot be move assigned in constant time because the moved-to list needs to be cleared first and the .clear() method is a linear-time operation. The moved-from list does not need to be cleared, it need only revert to an unspecified but valid state (the most logical state being an empty state) which can be done in constant time once ownership of its original resources has been transferred to the moved-to list, which is itself a constant-time operation.

Implementations that maintain an internal counter may also provide a constant time .size() member, however the need to physically count elements in a list (whether doubly-linked or singly-linked) is such a rare activity that the overhead of maintaining an internal counter is often eliminated in order to ensure optimum performance in the majority of cases where a count is rarely or indeed never required. Often it is enough to know that a list is empty or not (rather than knowing the precise number of elements) and that can be done in constant time whether empty or not. However, you can always derive your own "counted" list from a "standard" list to cater for those cases where a counted list is a constant-time requirement in your program, but keep in mind this will add a small but not insignificant overhead to each insertion, extraction, copy and move operation.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

insert, delete, find, getfirst, getlast, getnext

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the operations in singly linked lists?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you solve josephus problem using circular linked list?

The Josephus problem is a problem to locate the place for the last survivour. It shows the power of the circular linked list over the singly linked lists.


Convert single linked list to double linked list?

You copy a singly linked list into a doubly linked list by iterating over the singly linked list and, for each element, calling the doubly linked list insert function.


Explain the features of doubly linked list?

Well, in a singly linked list you can only move forward, if the pointer you seek is behind your current position you'll have to cross the hole list to get there. In a doubly linked list you can simply move back as well as forward.... hope this helps...


Traversing in Doubly Linked List is faster then Singly Linked List?

Traversing a doubly linked list is generally faster than traversing a singly linked list, but the speedup depends on how you do the traversal:Traversing from first to last node: No difference.Random access: Doubly linked list is faster, the difference is a fixed factor. (Like twice as fast. Which makes it still very slow for random access compared to arrays.)Reverse order: Doubly linked list is just as fast traversing "backwards" as "forwards", while a singly linked list traversing in reverse order needs to traverse the entire list once for every element in the list - it is a LOT slower. (Time complexity O(n) for doubly linked list, O(n*n) for singly linked, if you are familiar with the notation.)If you are talking about the computer science "big O notation", doubly linked and singly liked lists are the same. This is because the Big O notation ignores fixed factors and only looks at how time increases with the length of the list, and in this respect the two are the same. (Except for the special case of traversing the list in reverse order. Even here a singly linked list could do it in O(n) time - same as a doubly linked list - by reversing the list (O(n)) before traversing it (O(n)) for a total time of 2*O(n), which by the rules of Big O is the same as O(n).)


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.

Related questions

How do you solve josephus problem using circular linked list?

The Josephus problem is a problem to locate the place for the last survivour. It shows the power of the circular linked list over the singly linked lists.


What the different between single and double linked list regarding space and operation?

Doubly linked lists require more memory than singly linked lists because each node in a doubly-linked list requires two pointers whereas each node in a singly-linked list only requires one pointer. In terms of operation, doubly-linked lists are only useful if you need bi-directional traversal of the the list. If you only need mono-directional traversal, a singly-linked list is more efficient. However, linked lists of either sort do not perform well when random access is essential. In this case a vector or an array will provide constant time access to any element, and memory consumption is further reduced since there is no longer a need for pointers. However, dynamic expansion of an array can be costly in terms of memory consumption and performance. In cases where random access and scalability are required, one or the other must be compromised.


Convert single linked list to double linked list?

You copy a singly linked list into a doubly linked list by iterating over the singly linked list and, for each element, calling the doubly linked list insert function.


Explain the features of doubly linked list?

Well, in a singly linked list you can only move forward, if the pointer you seek is behind your current position you'll have to cross the hole list to get there. In a doubly linked list you can simply move back as well as forward.... hope this helps...


What is the disadvantage of singly linked list?

This is a searching question.


Which is the easy insertion operator single linked-list or double-linked list?

It is easier to insert into a singly linked list.


what are the differences between singly link list and doubly link list?

singly linked list stores only the address of next node while doubly linked list stores the address of previous node and next node and hence it is called doubly linked list. In singly linked list only forward traversing is possible while in doubly linked list forward and backward traversal is possible.


What is a singly linked linear list?

A singly linked list is a linked list which only provides links in "one direction". Using a metaphor, a singly linked list is a one way street, while a doubly linked list is a two way street. Once you move forward in a singly linked list, there is no way to go backwards unless you kept your reference/pointer from before. A singly linked list would look like this: start ----> node1---->node2---->node3 ----> NULL You will see that node2 only has a link forward to node3 - it does not have a link backwards to node1, even though node1 has a link forwards to node2. To prevent us from permanently losing access to portions of the linked list, we generally keep a reference/pointer to "start". A doubly linked list would have twice the number of pointers/references as a singly linked list - making it very inefficient to store small datatypes. On the other hand, it would be possible to move both forwards and backwards with a doubly linked list because you have links pointing both forwards and backwards.


Traversing in Doubly Linked List is faster then Singly Linked List?

Traversing a doubly linked list is generally faster than traversing a singly linked list, but the speedup depends on how you do the traversal:Traversing from first to last node: No difference.Random access: Doubly linked list is faster, the difference is a fixed factor. (Like twice as fast. Which makes it still very slow for random access compared to arrays.)Reverse order: Doubly linked list is just as fast traversing "backwards" as "forwards", while a singly linked list traversing in reverse order needs to traverse the entire list once for every element in the list - it is a LOT slower. (Time complexity O(n) for doubly linked list, O(n*n) for singly linked, if you are familiar with the notation.)If you are talking about the computer science "big O notation", doubly linked and singly liked lists are the same. This is because the Big O notation ignores fixed factors and only looks at how time increases with the length of the list, and in this respect the two are the same. (Except for the special case of traversing the list in reverse order. Even here a singly linked list could do it in O(n) time - same as a doubly linked list - by reversing the list (O(n)) before traversing it (O(n)) for a total time of 2*O(n), which by the rules of Big O is the same as O(n).)


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.


What advantages of a sorted list over a linked list?

All lists are linked lists; there is no such thing as a separate "sorted list". There are algorithms that can sort a list, of course, but they all work on linked lists.


What is the minimum number of additional pointers will be needed to reverse a singly linked list?

3 pointers...