[PR #935] [CLOSED] feat: add reverse() function #1466

Open
opened 2026-01-29 15:21:03 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/935
Author: @ybrenning
Created: 1/17/2022
Status: Closed

Base: masterHead: master


📝 Commits (10+)

📊 Changes

1 file changed (+141 additions, -168 deletions)

View changed files

📝 data_structures/linked_list/doubly_linked_list.c (+141 -168)

📄 Description

Description of Change

Added implementation of a reverse() function which takes a pointer to the head node of a doubly linked list and returns the linked list in reversed order. Also updated/added documentation and example use case in the example() function.

References

Closes #934

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Implementation of linked list reversal.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/935 **Author:** [@ybrenning](https://github.com/ybrenning) **Created:** 1/17/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`ce71a15`](https://github.com/TheAlgorithms/C/commit/ce71a1535efc50594d44c2eef55833835949b055) feat: add `reverse()` function - [`864b685`](https://github.com/TheAlgorithms/C/commit/864b6850b33964008f156e35bebe9a9d2e2415f0) docs: reformatting - [`7bf010b`](https://github.com/TheAlgorithms/C/commit/7bf010bb8a0e0616d12b2cbb384d08377844bf8d) fix: reformatting if-block - [`a0be01b`](https://github.com/TheAlgorithms/C/commit/a0be01ba05158b90fa295df94d2cc0ef008e9326) fix: reformatting - [`8d5c031`](https://github.com/TheAlgorithms/C/commit/8d5c031cd6c8468ba106634ed8b39eb2cf6443e2) Update data_structures/linked_list/doubly_linked_list.c - [`302e440`](https://github.com/TheAlgorithms/C/commit/302e4401eac3eb41e1b209f0fea738a82eb04bf7) fix: rewriting `delete()` function - [`43f4203`](https://github.com/TheAlgorithms/C/commit/43f4203a1c48be41dfe562bdab3d6ca3e1729b5f) Merge branch 'master' of https://github.com/ybrenning/C - [`de46efe`](https://github.com/TheAlgorithms/C/commit/de46efefde8a892bb4ee58d8da7566af73c60c09) Update data_structures/linked_list/doubly_linked_list.c - [`d89e017`](https://github.com/TheAlgorithms/C/commit/d89e017971f6dfdb982df506595cfc843399db1a) Update data_structures/linked_list/doubly_linked_list.c - [`d6693b9`](https://github.com/TheAlgorithms/C/commit/d6693b9e4a954cd52d004af4aa7f9c21b012feea) Update data_structures/linked_list/doubly_linked_list.c ### 📊 Changes **1 file changed** (+141 additions, -168 deletions) <details> <summary>View changed files</summary> 📝 `data_structures/linked_list/doubly_linked_list.c` (+141 -168) </details> ### 📄 Description #### Description of Change Added implementation of a `reverse()` function which takes a pointer to the head node of a doubly linked list and returns the linked list in reversed order. Also updated/added documentation and example use case in the `example()` function. #### References Closes #934 #### Checklist - [x] Added description of change - [ ] Added file name matches [File name guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#File-Name-guidelines) - [x] Added tests and example, test must pass - [x] Relevant documentation/comments is changed or added - [x] PR title follows semantic [commit guidelines](https://github.com/TheAlgorithms/C/blob/master/CONTRIBUTING.md#Commit-Guidelines) - [x] Search previous suggestions before making a new one, as yours may be a duplicate. - [x] I acknowledge that all my contributions will be made under the project's license. Notes: Implementation of linked list reversal. <a href="https://gitpod.io/#https://github.com/TheAlgorithms/C/pull/935"><img src="https://gitpod.io/button/open-in-gitpod.svg"/></a> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:21:03 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#1466