You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
I think the method in SinglyLinkedList is not right implementation, #2938
*/
public void swapNodes(int a, int b) {
Node currentNode = head;
Node temp = null;
while (currentNode != null) {
if (currentNode.next.value == a) {
temp = currentNode.next;
}
if (currentNode.next.value == b) {
currentNode.next = temp;
}
currentNode = currentNode.next;
}
}
Yes There is a Problem is swap funtion. They Change the values of Two Nodes Instead of Nodes. The Best Approch the Change the Nodes not values. Because In Real Time project if any node carring big amount of data then it is not good ot change values . it is better to change the Node.
---- 回复的原邮件 ----
| 发件人 | Yash ***@***.***> |
| 日期 | 2022年02月11日 01:44 |
| 收件人 | ***@***.***> |
| 抄送至 | ***@***.******@***.***> |
| 主题 | Re: [TheAlgorithms/Java] I think the method in SinglyLinkedList is not right implementation, (Issue #2938) |
Yes There is a Problem is swap funtion. They Change the values of Two Nodes Instead of Nodes. The Best Approch the Change the Nodes not values. Because In Real Time project if any node carring big amount of data then it is not good ot change values . it is better to change the Node.
If You assign this Task to Me Then i can Fix it..
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
---- 回复的原邮件 ----
| 发件人 | Yash ***@***.***> |
| 日期 | 2022年02月11日 01:44 |
| 收件人 | ***@***.***> |
| 抄送至 | ***@***.******@***.***> |
| 主题 | Re: [TheAlgorithms/Java] I think the method in SinglyLinkedList is not right implementation, (Issue #2938) |
Yes There is a Problem is swap funtion. They Change the values of Two Nodes Instead of Nodes. The Best Approch the Change the Nodes not values. Because In Real Time project if any node carring big amount of data then it is not good ot change values . it is better to change the Node.
If You assign this Task to Me Then i can Fix it..
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please reopen this issue once you add more information and updates here. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!
Activity
zhrgithub commentedon Feb 9, 2022
zhrgithub commentedon Feb 10, 2022
YashCoder03 commentedon Feb 10, 2022
Yes There is a Problem is swap funtion. They Change the values of Two Nodes Instead of Nodes. The Best Approch the Change the Nodes not values. Because In Real Time project if any node carring big amount of data then it is not good ot change values . it is better to change the Node.
If You assign this Task to Me Then i can Fix it..
zhrgithub commentedon Feb 11, 2022
zhrgithub commentedon Feb 11, 2022
github-actions commentedon Mar 14, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
rajoriaakash commentedon Mar 20, 2022
Can i try on this issue?
github-actions commentedon Apr 20, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
github-actions commentedon Apr 27, 2022
Please reopen this issue once you add more information and updates here. If this is not the case and you need some help, feel free to seek help from our Gitter or ping one of the reviewers. Thank you for your contributions!