From 1585999b298af79390bed985cf7137c10196f914 Mon Sep 17 00:00:00 2001 From: deepika-arora <73037462+deepika-arora@users.noreply.github.com> Date: Sun, 24 Oct 2021 11:42:32 +0530 Subject: [PATCH] Update circularListinsertion --- circularListinsertion | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/circularListinsertion b/circularListinsertion index 49f76ed..2464514 100644 --- a/circularListinsertion +++ b/circularListinsertion @@ -2,17 +2,16 @@ struct Node *addToEmpty(struct Node *last, int data) { // This function is only for empty list if (last != NULL) - return last; + return last; // Creating a node dynamically. - struct Node *temp = - (struct Node*)malloc(sizeof(struct Node)); + struct Node *temp = (struct Node*)malloc(sizeof(struct Node)); // Assigning the data. temp -> data = data; last = temp; - // Note : list was empty. We link single node - // to itself. + + // Note : list was empty. We link single node to itself. temp -> next = last; return last;