Created
July 23, 2017 13:55
-
-
Save visparashar/f7c9d94ad163af6d11665c20766a39ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LinkedListOperations { | |
public static void main(String[] args) { | |
LinkedList list = new LinkedList(); | |
list.insert(1); | |
list.insert(2); | |
list.insert(4); | |
list.insert(3); | |
list.insert(5); | |
list.show(); | |
list.delete(2); | |
list.delete(4); | |
list.show(); | |
list.insertAtFirst(9); | |
list.show(); | |
list.insertAfter(3,4); | |
list.show(); | |
list.insertAfter(5,6); | |
list.show(); | |
list.deleteAtPosition(3); | |
list.show(); | |
list.deleteAtPosition(1); | |
list.show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment