Write algorithm to perform insert and delete operations in a linear queue and implement the logic for the same
import java.util.LinkedList;
public class Main {
public static void main(String[] args) {
LinkedList<Integer> linkedList = new LinkedList<>();
linkedList.addLast(1);
linkedList.addLast(2);
linkedList.addLast(3);
linkedList.removeFirst();
}
}
Comments
Leave a comment