Skip to content

Instantly share code, notes, and snippets.

@AMV007
Created March 6, 2020 17:43
Show Gist options
  • Save AMV007/faf313bbeb7962db83c8b507785e972c to your computer and use it in GitHub Desktop.
Save AMV007/faf313bbeb7962db83c8b507785e972c to your computer and use it in GitHub Desktop.
some code for discuss
while (l1 || l2){
if (l1.val <= l2.val){
l3.insert(l1.val)
l1=l1.next
}
else{
l3.insert(l2.val)
l2=l2.next
}
}
while (l1){
l3.insert(l1.val)
l1=l1.next
}
while (l2){
l3.insert(l2.val)
l2=l2.next
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment