From 168f8a5a9a26e686929a602d3a5a455295eac351 Mon Sep 17 00:00:00 2001 From: Lavanyadani8 <93485489+Lavanyadani8@users.noreply.github.com> Date: Thu, 19 May 2022 13:28:09 +0530 Subject: [PATCH 1/3] changes no --- Linked List 1/AppendLastNToFirst.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linked List 1/AppendLastNToFirst.cpp b/Linked List 1/AppendLastNToFirst.cpp index ca9f4c2..7483fc1 100644 --- a/Linked List 1/AppendLastNToFirst.cpp +++ b/Linked List 1/AppendLastNToFirst.cpp @@ -68,7 +68,7 @@ Node *appendLastNToFirst(Node *head, int n){ //corner case if(n == 0 or head == NULL) { return head; - } + Node *tail = head; Node *ptr = head; From 630e3bf7327d9805d4eca37c543c74288803dd8c Mon Sep 17 00:00:00 2001 From: Lavanyadani8 <93485489+Lavanyadani8@users.noreply.github.com> Date: Thu, 19 May 2022 13:34:58 +0530 Subject: [PATCH 2/3] AppendLastNToFirst.cpp --- Linked List 1/AppendLastNToFirst.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linked List 1/AppendLastNToFirst.cpp b/Linked List 1/AppendLastNToFirst.cpp index 7483fc1..a3142af 100644 --- a/Linked List 1/AppendLastNToFirst.cpp +++ b/Linked List 1/AppendLastNToFirst.cpp @@ -79,7 +79,7 @@ Node *appendLastNToFirst(Node *head, int n){ tail = tail -> next; length++; } - + int counter = 1; while(counter < length - n) { From 8c80fbf2ceffa6874506e7ec7a5b58e8c8c990ab Mon Sep 17 00:00:00 2001 From: Lavanyadani8 <93485489+Lavanyadani8@users.noreply.github.com> Date: Thu, 19 May 2022 13:36:41 +0530 Subject: [PATCH 3/3] README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d162c2..cf96f10 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # Data_Structure_CodingNinjas.com -These are my solutions to the Data Structure and Algorithm Course on CodingNinjas.com using C++. +These are my solutions to the Data Structure and Algorithm Course on CodingNinjas.com using C++