please show your code through intellij if you can thank you

package circularlinkedlist;

import java.util.Iterator;

public class CircularLinkedList<E> implements Iterable<E> {

// Your variables

Node<E> head;

Node<E> tail;


// implement this constructor

public CircularLinkedList() {


// I highly recommend using this helper method

// Return Node<E> found at the specified index

// be sure to handle out of bounds cases

private Node<E> getNode(int index ) {

return null;


// attach a node to the end of the list

public boolean add(E item) {


return false;


// Cases to handle

// out of bounds

// adding to empty list

// adding to front

// adding to “end”

// adding anywhere else


public void add(int index, E item){


// remove must handle the following cases

// out of bounds

// removing the only thing in the list

// removing the first thing in the list (need to adjust the last thing in the list to point to the beginning)

// removing the last thing

// removing any other node


public E remove(int index) {

return null;


// Turns your list into a string

// Useful for debugging

public String toString(){

Node<E> current = head;

StringBuilder result = new StringBuilder();

if(size == 0){

return “”;


if(size == 1) {

return head.item.toString();





result.append(” ==> “);

current =;

} while(current != head);


return result.toString();


public Iterator<E> iterator() {

return new ListIterator<E>();


// provided code for different assignment

// you should not have to change this

// change at your own risk!

// this class is not static because it needs the class it’s inside of to survive!

private class ListIterator<E> implements Iterator<E>{

Node<E> nextItem;

Node<E> prev;

int index;


//Creates a new iterator that starts at the head of the list

public ListIterator(){

nextItem = (Node<E>) head;

index = 0;


// returns true if there is a next node

// this is always should return true if the list has something in it

public boolean hasNext() {

// TODO Auto-generated method stub

return size != 0;


// advances the iterator to the next item

// handles wrapping around back to the head automatically for you

public E next() {

// TODO Auto-generated method stub

prev = nextItem;

nextItem =;

index = (index + 1) % size;

return prev.item;


// removed the last node was visted by the .next() call

// for example if we had just created a iterator

// the following calls would remove the item at index 1 (the second person in the ring)

// next() next() remove()

public void remove() {

int target;

if(nextItem == head) {

target = size – 1;

} else{

target = index – 1;



CircularLinkedList.this.remove(target); //calls the above class



// It’s easiest if you keep it a singly linked list


private static class Node<E>{

E item;

Node<E> next;

public Node(E item) {

this.item = item;



public static void main(String[] args){



public class SolitaireEncryption {

public static char encryptChar(char letter, int key) {

int value = letter – ‘a’;

int encryptedValue = (value + key) % 26;

char encryptedChar = (char) (encryptedValue+’a’);

return encryptedChar;


public static char decryptChar(char letter, int key) {

int value = letter – ‘a’;

int decryptedValue = (value + (26-key)) % 26;

char decryptedChar = (char) (decryptedValue+’a’);

return decryptedChar;


public int getKey(CircularLinkedList<Integer> deck){ // calls the steps methods

return -1;


private static void step1(CircularLinkedList<Integer> deck){


private static void step2(CircularLinkedList<Integer> deck){


private static void step3(CircularLinkedList<Integer> deck){


private static void step4(CircularLinkedList<Integer> deck){


private static int step5(CircularLinkedList<Integer> deck){

return -1;


public static void main(String[] args) {

CircularLinkedList<Integer> deck = new CircularLinkedList<>();



Research Paper 101
Calculate your paper price
Pages (550 words)
Approximate price: -

Reasons to trust Research Paper 101

On Time Delivery

We pride ourselves in meeting the deadlines of our customers. We take your order, assign a writer but allow some more time for ourselves to edit the paper before delivering to you. You are guaranteed a flawless paper on a timely manner...

24x7 Customer Live Support

Our team at Research Paper 101 is committed to handling your paper according to the specfications and are available 24*7 for communication. Whenever you need a quick help, you can talk to our writers via the system messaging or contact support via live chat and we will deliver your message instantly.

Experienced Subject Experts

Online Experts from Research Paper 101 are qualified both academically and in their experiences. Many are Masters and Phd holders and therefore, are qualified to handle complex assignments that require critical thinking and analyses...

Customer Satisfaction

We offer dissertation papers as per students’ wishes. We also help craft out the best topics and design concept papers. By ordering with us, you are guaranteed of defending and making through those hard faced professors in the defense panel!

100% Plagiarism Free

We at Research Paper 101 take plagiarism as a serious offence. From the start, we train our writers to write all their papers from scratch. We also check if the papers have been cited appropriately. Our website also has a tool designed to check for plagiarism that has been made erroniusly. In essense, the paper you get will be 100% legit...

Affordable Prices

We understand that being a student is very challenging, some students balance between work and studies in order to survive. We therefore offer pocket friendly rates that are very competitive in the market.

Try it now!

Calculate the price of your order

Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.


Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.


Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.


Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.


Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.

Need help? Chat with Us