1. Write a program using Java to move the last element of a LL to the beginning of the list.
2. Write a program using Java to find the number of common elements of two linked lists.
e.g. 1à3à5à7ànull
2à3à7à9à11ànull
Output: 2
3. Write a program using Java to reverse the elements of a linked list
4. Write a program using Java to find the middle node of a linked list (ensure that the number of nodes of the LL is an odd number).
5. Write a program to count the number of times a given integer appears in a LL.
6. Preparation for theory-based questions which can be asked during interview.
6.1 Linked List vs 1-d Array
6.2 Comparison of Singly Linked List, doubly linked list and circular Linked list. Advantages and disadvantages of each.
Comments
Leave a comment