Skip to content

Commit

Permalink
Merge pull request #1767 from Asmi1108/main
Browse files Browse the repository at this point in the history
Adding implementation of reversing a linked list in java
  • Loading branch information
ajay-dhangar authored Nov 4, 2024
2 parents ff10345 + 1c9528d commit 1be9c5c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions java/Reverse_linked_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ description: "This document explains reversing a linked list in java."
tags: [java, data structures, linked list]
---

# *Reversing a Linked List*

## *Description*

Given a singly linked list, reverse the order of its nodes.
Expand Down Expand Up @@ -91,10 +89,9 @@ Reversed List:
5 4 3 2 1
```


- *Time Complexity*: O(n), where n is the number of nodes.

- *Space Complexity*: O(1), as only a constant amount of space is used.

# *Conclusion*
## Conclusion
In this article, we learned about reversing a linked list and implemented it in Java.

0 comments on commit 1be9c5c

Please sign in to comment.