> For the complete documentation index, see [llms.txt](https://nitinranganath.gitbook.io/data-structures/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nitinranganath.gitbook.io/data-structures/linked-list.md).

# Singly Linked List

- [Displaying the Nodes](https://nitinranganath.gitbook.io/data-structures/linked-list/displaying-the-nodes.md): Iterative and recursive method to print all the nodes in a linked list.
- [Counting the Nodes](https://nitinranganath.gitbook.io/data-structures/linked-list/counting-the-nodes.md): Iterative and recursive way of counting the number of nodes in a linked list.
- [Sum of all Nodes](https://nitinranganath.gitbook.io/data-structures/linked-list/sum-of-all-nodes.md): Iterative and recursive way of finding the sum of data of all the nodes in a linked list.
- [Finding the Maximum Element](https://nitinranganath.gitbook.io/data-structures/linked-list/finding-the-maximum-element.md): Iterative and recursive way of finding the maximum among all the node's data.
- [Searching in a Node](https://nitinranganath.gitbook.io/data-structures/linked-list/searching-in-a-node.md): Iterative and recursive implementation of linearly searching for an element in a linked list.
- [Inserting a Node](https://nitinranganath.gitbook.io/data-structures/linked-list/inserting-a-node.md): Procedure to insert a new node in the beginning, end or at a specific position in the linked list.
- [Inserting a Node in Sorted List](https://nitinranganath.gitbook.io/data-structures/linked-list/inserting-a-node-in-sorted-list.md): Procedure to insert a new node in a sorted linked list.
- [Deleting a Node](https://nitinranganath.gitbook.io/data-structures/linked-list/deleting-a-node.md): Procedure to delete a node from any position in a linked list.
- [Checking if List is Sorted](https://nitinranganath.gitbook.io/data-structures/linked-list/checking-if-list-is-sorted.md): Procedure to check if a linked list is sorted or not.
- [Removing Duplicates from a List](https://nitinranganath.gitbook.io/data-structures/linked-list/removing-duplicates-from-a-list.md): Procedure to remove duplicate nodes from a linked list.
- [Reversing a Linked List](https://nitinranganath.gitbook.io/data-structures/linked-list/reversing-a-linked-list.md): Iterative and recursive approaches to reverse a linked list.
- [Concatenating Two Lists](https://nitinranganath.gitbook.io/data-structures/linked-list/concatenating-two-lists.md): Procedure to concatenate two linked lists.
- [Detecting a Loop in Linked List](https://nitinranganath.gitbook.io/data-structures/linked-list/detecting-a-loop-in-linked-list.md): Procedure to check if a given list has a loop using Floyd's Cycle Finding Algorithm.
- [Merge Two Sorted Lists](https://nitinranganath.gitbook.io/data-structures/linked-list/merge-two-sorted-lists.md): Procedure to merge two sorted linked lists.
- [Finding the Middle  Node](https://nitinranganath.gitbook.io/data-structures/linked-list/finding-the-middle-node.md): Procedure to find the middle node of a singly linked list.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nitinranganath.gitbook.io/data-structures/linked-list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
