mirror of
https://github.com/TheAlgorithms/C.git
synced 2026-02-04 05:44:35 +00:00
[PR #359] [CLOSED] Added reversing of linked list and Floyd Cycle Detection Algo #707
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/TheAlgorithms/C/pull/359
Author: @apoorvam25
Created: 10/6/2019
Status: ❌ Closed
Base:
master← Head:master📝 Commits (4)
f550790added RC4 stream cipherfdae814updated README.md09a763eMerge pull request #354 from Cornul11/rc4aae98fbAdded reversing of linked list and Floyd Cycle Detection Algo📊 Changes
4 files changed (+316 additions, -0 deletions)
View changed files
📝
README.md(+3 -0)➕
cipher/rc4.c(+189 -0)➕
data_structures/linked_list/Floyd_CycleDetectionAlgo.c(+63 -0)➕
data_structures/linked_list/ReverseLinkedList.c(+61 -0)📄 Description
An Iterative version of reversing a Linked List has been added.
Time Complexity : O(n)
Space Complexity : O(1)
Floyd's Algorithm of detecting a loop in a given Linked list has also been added, which uses two pointers moving at different speeds to walk the linked list. Once they enter the loop they are expected to meet, which denotes that there is a loop.
Time Complexity : O(n)
Space Complexity : O(1)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.