Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bkb181/a0655d9c01c19664007120b904f0776d to your computer and use it in GitHub Desktop.
Save bkb181/a0655d9c01c19664007120b904f0776d to your computer and use it in GitHub Desktop.
| Approaches | Time Complexity | Space Complexity |
+==================+=================+==================+
| Reversing the lists and merging | O(n) | O(n) |
+------------------+-----------------+------------------+
| Merging the list and reversing | O(n) | O(n) |
+------------------+-----------------+------------------+
| Iterative Approach | (On) | O(1) |
+------------------+-----------------+------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment