Update Add-Two-linkedlist.cpp

pull/1019/head
Abhishek Anand 2022-10-14 22:49:48 +05:30 committed by GitHub
parent c6fae5ba7a
commit 6de82be85a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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. /* 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. 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.*/