This repository provides a basic Singly Linked List implementation. Your task is to implement the reverseLinkedList() function in SinglyLinkedList.cpp.
Before making any changes, you need to fork this repository to your own GitHub account.
- Click the Fork button at the top right of this repo.
- This will create a copy under
https://github.com/YOUR_GITHUB_USERNAME/SinglyLinkedListWarmUp.
Once forked, clone it to your local machine:
git clone https://github.com/YOUR_GITHUB_USERNAME/SinglyLinkedListWarmUp.git
cd SinglyLinkedListWarmUpAlways work on a new branch before making changes:
git checkout -b reverse-linked-listYour task is to implement the reverseLinkedList() function, which should reverse the linked list in place. Do not modify other parts of the code.
If the original list is:
1 -> 2 -> 3 -> NULL
After calling reverseLinkedList(), it should become:
3 -> 2 -> 1 -> NULL
Once implemented, save and commit your changes:
git add .
git commit -m "Implemented reverseLinkedList function"Send your changes to your forked repository:
git push origin reverse-linked-list- Go to your forked repo on GitHub.
- Click "Contribute" → "Open Pull Request".
- Make sure to set the base repository to:
base repository: StrongKs/SinglyLinkedListWarmUp base branch: main - Add a short description of your implementation.
- Click "Create pull request".
Once you submit your PR, it will be reviewed. If everything looks good, it will be merged into the main repository.
If you run into any issues, feel free to ask questions in the Issues section of this repository.
Happy coding! 🚀