Alternate approach for determining whether a linked list is palindrome or not #574
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The added file contains the code for an alternate approach for determining whether a given linked list is a palindrome or not. The given linked list is reversed(without losing the original one) and then its data values are compared with the original list's data values. The linked list is not reversed in place to avoid changing of the original list. Instead, a new reversed list is created and then compared to the original one.
![image](https://private-user-images.githubusercontent.com/144547966/403375332-a57b4b73-a7b2-4c09-bd9c-438e449c2f72.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NTg3NzUsIm5iZiI6MTczOTQ1ODQ3NSwicGF0aCI6Ii8xNDQ1NDc5NjYvNDAzMzc1MzMyLWE1N2I0YjczLWE3YjItNGMwOS1iZDljLTQzOGU0NDljMmY3Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QxNDU0MzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jMTE4NDE4ZThiMzlkZTI2NGM5ODNiNGM4Njk4NmYxYTBiMzU1MmVmYTg5NTcyMWQwMjdlYzE4MjU2ZTkyZGViJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.oNXCWFjkD0Pl52VzlwZ0G-F8Bpgba-5AlXAC9a42w38)
Submission Screenshot