I am trying to write a method to find the smallest value in a queue, but I keep on getting an error and I can not figure out what’s wrong! public void findmin(){ Node current = front; E min =...


I am trying to write a method to find the smallest value in a queue, but I keep on getting an error and I can not figure out what’s wrong!




public void findmin(){



Node current = front;


E min = current.Data;



while ( current != null)


{


if (min > current.Data)



min= current.Data ;



current= current.next;


}


System.out.println("the smallest value in the queue is: "+ min);



}



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here