what does the following code do? public int function(T e) Node temp = head; int var = 0; while (temp != null) if(temp.Data e) return var; var = var+1; temp = temp. Next return -1; } O a. Find and...


what does the following code do?<br>public int function(T e)<br>Node temp = head;<br>int var =<br>0;<br>while (temp != null)<br>if(temp.Data<br>e)<br>return var;<br>var =<br>var+1;<br>temp =<br>temp. Next<br>return -1;<br>}<br>O a. Find and delete a given element in the list<br>O b. Find and return the given element in the list<br>O c. Find and insert a new element in the list<br>O d. Find and return the position of the given element in the list<br>

Extracted text: what does the following code do? public int function(T e) Node temp = head; int var = 0; while (temp != null) if(temp.Data e) return var; var = var+1; temp = temp. Next return -1; } O a. Find and delete a given element in the list O b. Find and return the given element in the list O c. Find and insert a new element in the list O d. Find and return the position of the given element in the list

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here