pa01 : Leetcode practice with linked lists
num | ready? | description | assigned | due |
---|---|---|---|---|
pa01 | true | Leetcode practice with linked lists | Wed 01/10 09:00AM |
Additional Practice with linked lists
Every lab will have some additional practice problems that are not part of the lab grade. However, they are important to complete to succeed in the exams. Please signup for a free account on LeetCode https://leetcode.com and submit your solution there:
- Reverse a singly linked list: https://leetcode.com/problems/reverse-linked-list/
- Merge two sorted lists: https://leetcode.com/problems/merge-two-sorted-lists/
- Remove duplicates from sorted lists: https://leetcode.com/problems/remove-duplicates-from-sorted-list/
- Middle of the Linked List: https://leetcode.com/problems/middle-of-the-linked-list/
Note that in lecture 1 we coded a recursive implementation for problem #1. Try solving the same problem iteratively. Also try to come up with a recursive implementation that is different from the one we implemented in lecture.