What is the functionality of the code

Assignment Help Basic Computer Science
Reference no: EM132322963

What is the functionality of the following code? Choose the most appropriate answer.

public int function()
{
	if(head == null)
		return Integer.MIN_VALUE;
	int var;
	Node temp = head;
	Node cur;
	while(temp.getNext() != head)
	{
		cur = temp;
		temp = temp.getNext();
	}
	if(temp == head)
	{
		var = head.getItem();
		head = null;
		return var;
	}
	var = temp.getItem();
	cur.setNext(head);
	return var;
}

a) Return data from the end of the list

b) Returns the data and deletes the node at the end of the list

c) Returns the data from the beginning of the list

d) Returns the data and deletes the node from the beginning of the list

Reference no: EM132322963

Questions Cloud

End of a data science project : What are the ten main components of a report that would be delivered at the end of a data science project?
What are the aspect of all of the functions : Information Governance and Legal Functions: According to the authors, Smallwood, Kahn, and Murphy, IG is perhaps one of the functional areas that impact legal.
How the changes have affected humanity : Discuss the technological changes that have been made since 2019 and how those changes have affected humanity, and how those changes have affected themselves.
Analyze the networking needs of business : Apply networking architecture knowledge to analyze the networking needs of business - Describe and explain the protocols and interactions that implement network
What is the functionality of the code : What is the functionality of the following code? Choose the most appropriate answer.
How to detect the presence of cycles in list effectively : Consider a small circular linked list. How to detect the presence of cycles in this list effectively?
Discussing what the chart is used for : The chart you select to represent your data will be influenced by many factors. Kirk (2016) has put each chart into the five main families below: Categorical.
Evaluating the effectiveness of interventions designed : Assignment - Evidence-Based Practice Problem - evaluating the effectiveness of interventions designed to meet the needs of adults
What is the functionality of the following code : What is the functionality of the following code? Choose the most appropriate answer.public int function()

Reviews

Write a Review

Basic Computer Science Questions & Answers

  New york city practice price discrimination

How does a typical movie theater in New York City practice price discrimination?

  Prior insertion system.out.printf formatting output in java

Prior to insertion of System.out.printf(), formatting the output to the console in Java

  Recent threat or attack on a government agency

Conduct research on a recent threat or attack on a government agency, military organization, or corporate enterprise.

  Please draw erd diagram with crow foot model

Bob's taxi management company provides management services to several independent taxi companies in a large city.

  Income effect and intertemporal substitution effect

Explain the difference between the income effect and intertemporal substitution effect (change in interest rates) on consumption today vs tomorrow.

  List the name and type of cable you will use it and location

Some of the users have 50 laptops with wireless cards for which wireless access is required. We assume each wireless access point allowed 20 wireless access device maximum

  A week after the upgrade it is foud out that there are some

while maintaining your companys configuration management it is determined that you need to upgrade your switches. after

  Evaluate why cost is not one of the five core metrics

Evaluate why cost is not one of the five core metrics of the SLIM model and speculate on the consequences if cost served as one.

  How might the client become aware this had happened

Give a scenario involving server reboot in which an RPC request is sent twice by the client and is executed twice by the server, with only a single ACK.

  Well-organized project proposal

The student will type a brief but thorough and well-organized project proposal that clearly describes the company or organization and its mission in which the student will be assuming the role of the client.

  Define cost shifting in your own words.

QUESTIONS: Define Cost Shifting in your own words. * Do you think that it is a fair practice or should it be legally banned?

  Consider the morality of the issue of releasing a worm

Consider the morality of the issue of releasing a worm. State if Morris's release of a worm would be morally justifiable according to Kantian ethics.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd