Fix incorrect outputs for Linked List Miscellaneous : 3 MQ (Pair-wise Swap)#27
Open
bhuvitw wants to merge 1 commit intoAnuj-er:mainfrom
Open
Fix incorrect outputs for Linked List Miscellaneous : 3 MQ (Pair-wise Swap)#27bhuvitw wants to merge 1 commit intoAnuj-er:mainfrom
bhuvitw wants to merge 1 commit intoAnuj-er:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📌 Summary
This PR corrects the expected answers for the Linked List Miscellaneous : 3 problem.
The question code performs pair-wise value swapping, not mirroring or reversing.
Code Logic Referenced
This swaps
(node1,node2), (node3,node4), ...✅ Correct Answers
1 2 3 4 5 62 1 4 3 6 51 1 2 2 3 31 1 2 2 3 31 1 1 2 2 21 1 2 1 2 2❌ Previously Incorrect Answers
1 2 3 4 5 61 3 5 5 3 11 1 2 2 3 31 2 3 3 2 11 1 1 2 2 21 1 2 2 1 1These correspond to reverse-pair or mirrored output, not the given code behavior.
📁 File Reference
Advance Data Structures_03-12-2024/8) Linked Lists/15) Linked List Miscellaneous - 1/Answer.txt🎯 Why this fix
The current answers do not match the algorithm.
Updated results reflect the accurate pair-wise swap behavior.
Please review and merge.