LinkedList
singlelinkedlist package com.demo.linkedlist; public class SinglyLinkedList { class Node{ int data; Node next; public Node(int data) { super(); this.data = data; this.next=null; } } Node head; public SinglyLinkedList() { head=null; } //add newnode at the end public void addNode(int val){ //to create a new node Node newnode=new Node(val); //if list is empty, then add at the begining if(head==null) { head=newnode; }else { Node temp=head; while(temp.next!=null) { temp=temp.next; } temp.next=newnode; } } public int searchbyvalue(int val) { if(head==null) { System.out.println("List is empty"); }else { Node temp=head; int pos=0; while(temp!=null && temp.data!=val) { temp=temp.next; pos++; } if(temp!=null) { return pos; } } return -1; } public void addByPosition(int val,int pos) { if(head==null &...