Inspiration

Merge Two Sorted Lists is a project inspired by the need to efficiently combine two sorted lists into one sorted list.

What it does

We created a method that takes two sorted linked lists as inputs and returns the head of the new sorted list.

How we built it

We used a combination of iterative and recursive algorithms to achieve this. We used two pointer approach and recursion to achieve the desired output. We also implemented insertion sort for sorting the linked list.

Challenges we ran into

The challenges we ran into included understanding and implementing the algorithms correctly. We also had to consider corner cases such as empty lists, different list sizes, etc.

Accomplishments that we're proud of

The accomplishments that we are proud of is that we were able to successfully implement our algorithm and solve the problem. We also learned a lot about sorting algorithms and linked lists in the process.

What we learned

What we learned was the importance of understanding the algorithm and problem before starting the implementation. We also learned how to use two pointer approach and recursion to solve a problem.

What's next for Merge Two Sorted Lists

What's next for Merge Two Sorted Lists is to explore other algorithms and use cases. We can also explore different data structures, such as heaps, to improve efficiency. We can also look into implementing other sorting algorithms to compare their efficiency.

Built With

Share this project:

Updates