From 6de82be85a21d5c6f9538e6ea2a1c5c6bc97a384 Mon Sep 17 00:00:00 2001 From: Abhishek Anand <104293997+chhotu2@users.noreply.github.com> Date: Fri, 14 Oct 2022 22:49:48 +0530 Subject: [PATCH] Update Add-Two-linkedlist.cpp --- algorithms/CPlusPlus/Linked-Lists/Add-Two-linkedlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algorithms/CPlusPlus/Linked-Lists/Add-Two-linkedlist.cpp b/algorithms/CPlusPlus/Linked-Lists/Add-Two-linkedlist.cpp index 5bd4f1bb..b013ccc8 100644 --- a/algorithms/CPlusPlus/Linked-Lists/Add-Two-linkedlist.cpp +++ b/algorithms/CPlusPlus/Linked-Lists/Add-Two-linkedlist.cpp @@ -1,7 +1,7 @@ /* In this algorithm two linked list is given in which we have to add both the linked list and store the output in another linked list. Time Complexity: O(m+n) where m and n are the sizes of given two linked lists. - Space Complexity: O(m+n) where m and n are the size of the given two linked list.*/ + Space Complexity: O(m) if (m>n) and O(n) if (n>m) ,where m and n are the size of the given two linked list.*/