Updated reduced create method when 2 lists are present

This commit is contained in:
Luke Else 2022-03-15 21:36:57 +00:00
parent c853d5250c
commit 5c91fce224

View File

@ -25,11 +25,7 @@ namespace C_.Datastructures
LinkedList<T> list; LinkedList<T> list;
list = list1; list = list1;
if (list == null || list.Count == 0) if (list == null || list.Count == 0) return list2;
{
//If list 2 is the only list present
return list2;
}
//Find end of list and append fist item of next list //Find end of list and append fist item of next list
if (list2 == null || list.Count == 0) return list; if (list2 == null || list.Count == 0) return list;