Write a function that returns the info of the kth element of the linked list. If no such element exists terminate the program. (getKThElement)

Answers

Answer 1

Answer:

Explanation:

The following code is written in Java and creates a function that takes a LinkedList as a parameter then the function asks the user for which position element they would like to retrieve, loops through the LinkedList, and returns the info on that element position. If that position is not found then the program ends. Position variable is subtracted by 1 in the loop since elements start at 0 in data structures.

 public static void searchForElement(LinkedList<String> myArr) {

       Scanner input = new Scanner(System.in);

       System.out.println("What position do you want to search for?");

       int position = input.nextInt();

       for (int x = 0; x < myArr.size(); x++) {

           if (position > myArr.size()) {

               break;

           }

           if (x == position - 1) {

               System.out.println(myArr.get(x));

           }

       }

   }


Related Questions

An attempt to generate a large number of session IDs and have a server process them as part of a session hijack attempt is known as what type of attack

Answers

Answer:

An attempt to generate a large number of session IDs and have a server process them as part of a session hijack attempt is known as

TCP Session Hijacking.

Explanation:

TCP Session Hijacking is a cyber-attack in which illegitimate access is acquired to a client's server in the network.  The attacker then hijacks the TCP/IP session by reading and modifying transmitted data packets and also sending requests to the addressee's server.  To achieve this attack effectively, the hacker generates a large number of session IDs, thereby confusing the client's server to process them as a part of the users' sessions. Sessions (a series of interactions between two communication end points) are used by applications to store user parameters and, they remain alive until the user logs off.

A business that helps people find jobs for a fee

Answers

career coaches is a business that help people to find job for free

Hiya people. I am a game developer and I need an idea for a new game. If you have any ideas, pls feel free to tell me. Best idea gets brainliest.

Answers

Answer:

A better RPG game all the one that are existing are the same dull thing

Explanation:

Answer:

There are many ideas you can get for games but now-a-days action games are getting more fame than others such as fortnite, freefire, pubg etc. I prefer you to make a game that is relatated to action or adventure. You can make it related to zombie hunting, or online fighting games, or some adventurous games like tomb raider.

The User Datagram Protocol (UDP) is called the connectionless protocol because: It does not attempt to fix bad packets but resends lost packets. It attempts to fix bad packets but does not resend lost packets. It does not attempt to fix bad packets or resend lost packets. It fixes bad packets and resends lost packets.

Answers

Answer:

The User Datagram Protocol (UDP) is called the connectionless protocol because:

It does not attempt to fix bad packets or resend lost packets.

Explanation:

Ports are openings or entrance doors through which data packages have access to a PC or server.  TCP and UDP are transport protocols with port numbers.  TCP means Transmission Control Protocol.  They are used to connect two devices over the internet and other networks.  UDP means User Datagram Protocol.  They are used to connect applications and to speed the transfer of data.  Comparatively, UDP is faster, simpler, and more efficient than TCP.  TCP enables retransmission of lost data packets, which UDP cannot do.

Should the security researcher have published exploit code that affects every version of Windows and cannot be patched

Answers

Answer:

No.

Explanation:

This is because there is probably the risk of malicious attackers grabbing the published exploit code that affects every window and then utilizes it for dubious purposes. Such as stealing vital information after gaining access.

The most ideal way for the security researcher to go about the exploit code that affects every version of the window is to meet the windows manufacturers, discuss the negative issues of windows software with them and eventually assist them in the software update to troubleshoot the patch.

Design an algorithm that takes in a stream z1, . . . , zM of M integers in [n] and at any time t can output a uniformly random element in z1, . . . , zt . Your algorithm may use at most polynomial in log n and log M space. Prove the correctness and analyze the space complexity of your algorithm. Y

Answers

Answer:

import random

def rand_select(*args):

   selected = random.choice(args)

   print( selected)

rand_select(12,32,43,54,2,34,65,2,64,74,97)

The space complexity of this program is O(1)

Explanation:

The list of arguments to the function is assigned to the variable "args" and the random's choice method randomly picks an item and assigns it to the variable "selected", then the variable is printed out on the screen. The memory used is 1 + 1 = 2, which is a constant, therefore making the space complexity to be O(1).

The function changeLocation is also called a _____.

class bike:
def __init__(self,size,idNum,color ):
self.size = size
self.location = 10
self.color = color
self.idNum = idNum

def changeLocation(self,newLocation):
self.location = newLocation


manipulator

initiator

method

constructor

Answers

Answer:

The answer is a method

Explanation:

Answer:

class and self

Explanation:

class Bike:

def __init__(self, str, float):

self.color = str

self.price = float

Steve is creating a document with proper nouns, which Word continues to identify as being misspelled.

Which of these steps should he do in this situation?

Skip the Spell Checker.
Right-click the noun and choose Ignore All.
Right-click and Add to dictionary.
B and C are correct.

Answers

B and c are correct answer

You are designing an internet router that will need to save it's settings between reboots. Which type of memory should be used to save these settings?
a. Disk
b. Does not matter
c. SRAM
d. Flash
e. DRAM

Answers

Answer:

d. Flash

Explanation:

A flash memory can be defined as an electronic non-volatile memory chip (storage medium) that is typically used on computer systems and other digital devices such as routers, USB flash drives, switches, digital cameras, mp3 players etc. A flash memory is an electronically erasable programmable read only memory (EEPROM) and as such data saved (written) on it can be erased electronically. Also, a flash memory do not require a source of power (electricity) to save or retain data through the use of a floating gate MOSFET (FGMOS) or floating gate transistor.

In this scenario, you are designing an internet router that will need to save it's settings between reboots. The type of memory that should be used to save these settings is a flash memory because it does not require power to write or save data.

Write a Java program that launches 1000 threads. Each thread adds 1 to a variable sum that initially is 0. You need to pass sum by reference to each thread. In order to pass it by reference, define an Integer wrapper object to hold sum. Run the program with and without synchronization to see its effect.

Answers

Java is a 3D mental breakdown in the sim game and he has to play the game and play it with the same thing he has been doing wrong and he is a queen and he is

is anyone a robIox creator?
me and some of my friends are going to work on a robIox game and we need someone to help us build and script it.
anyone wanna help?

Answers

Well, I am now getting into making Robl. games, so I would be able to help.

But the only downside is that my computer isn't working at the moment and may take a while to fix. But i'm sure when i am done with it, I could help.

need help with my cs110​

Answers

Yes so the it’s C 283 cause I think yes can

Squared Age as Year - A person born in 1980 can claim "I will be x years old in the year x squared." Write a python program to calculate how old a person born in 1980 will be when the value of their age (x) squared is equal to the year they are x years old on their birthday.

Answers

Answer:

40

Explanation:

its simple math

84 the the rout of 54

Question # 6
Dropdown
Choose the line of code that completes this program.

Output:

dog named Tiger

class pet:
def __init__(self,strSpecies,strName):
self.species = strSpecies
self.petName = strName

def __str__(self):
return self.species + " named " + self.petName

def changeName(self, newName):
self.petName = newName

# main program
myPetA = pet('dog', 'Spot')


print(myPetA)

Answers

Answer:

myPetA.changeName('Tiger') should be it

Explanation:

Answer:

myPetA.changeName('Tiger')

Explanation:

Correct answer edge 2020

In a paragraph or two, discuss the similarities and differences between NTFS, Share, and Linux permissions..

Answers

The similarity between NTFS Share and Linux permissions is that they change the access permissions.

The difference is that NTFS permissions allow you to provide users with more granular access while share permissions are easier to manage and apply.

How to illustrate the information?

Share permissions do not apply to users who are logged in locally to the server, but NTFS permissions do. Share permissions, as opposed to NTFS permissions, let you limit the number of active connections to a shared folder. Share permissions are set up in the "Permissions" settings' "Advanced Sharing" properties.

The most restrictive permission will take precedence over the other if you employ NTFS permissions and sharing permissions simultaneously. The user will only be able to read the file or have a look at the things in the folder, for instance, if NTFS share permissions are set to Full Control but share permissions are set to "Read."

In conclusion, NTFS permissions allow you to provide users more granular access while share permissions are easier to manage and apply.

Learn more about Linux on:

https://brainly.com/question/25480553

#SPJ1

write c++ program from 1to 100 to find prime numbers using statement.

please help me​

Answers

Answer:

int count;

for (int i = 1; i <= 100; i++){

count = 0;

for (int j = 1; j <=i; j++)

if (i%j==0) count ++;

if (count == 2) cout << i << " ";

}

Which of these is an example of collective voice?
A. He hopes to make the world better for his children.
B. I have always dreamed of a kinder and better world.
C. We are here to make a better world for our children.
D. Your purpose is to make the world a better place.

Answers

Answer:

option C

hope it helps! please mark me brainliest..

Merry Christmas good day

Answer:

c

Explanation:

To solve the difficulty of scaling memory organization, memories are physically organized into a ____-dimensional organization.
A) one
B) two
C) three
D) multi

Answers

Answer: two

Explanation:

Organizational memory is simply referred to as the accumulation of data or information that have been created for a particular organization.

To solve the difficulty of scaling memory organization, memories are physically organized into a two dimensional organization.

A graph shows the relationship between two or more variables that?
a. can be represented by any of these
b. are represented by circles
c. are represented by dots
d. are represented by bars
Please Answer I really would like to know!!!

Answers

Answer:

A. can be represented by any of these

Explanation:

which of the following is a valid c++ identifier a. mouse b. _int c. 2_stop d. float​

Answers

What are you taking abt

list down four ways to start word 2010​

Answers

1Locate the Word icon on the Start button's All Programs menu. Don't click to start Word now!
2Right-click the Microsoft Word 2010 menu item. A pop-up menu appears.
3Choose Send To→Desktop (Create Shortcut).
4Press the Esc key to hide the Start button menu and view the desktop.

Database are pranized in
consist of a series of
which consist of a senes of​

Answers

Answer:

fields and records I guess is the answer

"Write an SQL query that displays the Ssn and Last name of all employees who is a supervisor of a Department Manager"

Answers

Answer:

SELECT Ssn,

             Last_name

 FROM employees

WHERE position = supervisor;

Explanation:

SELECT is an SQL query statement that is used to initiate the display of wanted variables.

The names of the variables often succeed the SELECT statement and they are separated by commas.

FROM is an SQL query statement that indicates the table fro which the selected variables be displayed.

WHERE is used to filter your search and return only rows that meet the criteria.

; signifies the end of a query and calls for an execution.

what happens if the formula or if the function is typed incorrectly? give some common error displayed in ms excel 2007 and their possible reason

Answers

Answer:

Excel displays the #VALUE! error when a formula has the wrong type of argument.

Explanation:

Is there anyone to awnser Tech questions​

Answers

Answer:

yes

Explanation:

yes please i know the answer

Which sentence indicates that Jeff is mentioning the visual synopsis in his proposal while planning a media project?

In the proposal, Jeff states the reason to create the project. He also explains how his project will conclude with a perfect takeaway point. Jeff describes how he is going to tell the story through photography. He then mentions various strategies to engage his audience and describes plans to make sure that the project reaches his intended audience.

Answers

Answer:

I believe its the last question

Explanation:

Answer:

I would say describes plans to make sure that the project reaches his intended audience

Explanation:

none needed

Which form of data does the image represent? (10 points)

A. Analog data
B. Digital data

Answers

Where is the image?, I cant answer if there is no image
b
.......…..................

a clearly stated objective that how program should work and how it respond to a error is called??

Answers

Answer:

A Problem statement

Explanation:

I hope this is right

Vehicle identification number, color, weight, and horsepower best exemplify: A. data markers. B. attributes. C. entities. D. entity types. E. identifiers.

Answers

Answer:

The appropriate alternative is option B (attributes).

Explanation:

An attributes or attribute seems to be a key cornerstone of good governance provided to individuals, a community, as well as something else.  Your greatest trait may be individuals ability to support others besides such as stopping traffic such that the duck or a bird community will further drive down the path.  

Other options really aren't connected to something like the situation in question. So the choice above would be right.

A Boolean expression is one that is either: Group of answer choices x or y None of the answers are correct Positive or negative True or False

Answers

Answer:

True or False

Explanation:

Boolean logic refers to a theory of mathematics developed by the prominent British mathematician, called George Boole. In Boolean logic, all variables are either true or false and are denoted by the number "1" or "0" respectively; True = 1 or False = 0.

Additionally, Boolean logic allow users to combine keywords with Boolean operators (quotes, AND, OR, near/n) to give a more personalized and relevant search results.

Hence, a Boolean expression is one that is either True or False and it is also known as logical expression.

Other Questions
A life insurance company is offering Anna a $100,000 life insurance policy for$300. The insurance actuary has calculated that the probability of death withina year of a 30 year old woman is 0.00064. Determine the expected value of theinsurance policy to Anna. Why is it believed that fossil fuels, such as coal, store energy from the sun?a Coal must be mined.b Coal was formed by immense pressure.c Coal is heated by the sun.d Coal is the fossilized remains of green plants. 2.To fulfill their duties to a Lord or a King - Vassals could serve as Knights, orA.provide a portion of their crops.B.hire knights to serve their lord in their place.C.perform peacetime civil services.D. serve the church as a member of the clergy. Please help me out with this is The reaction time is different for different stimulitrue or false? Adam has created a document for publishing and needs to ensure that no changes can be made. He has accessed theDeveloper tab and is using the Restrict Editing task pane. Which option should Adam choose?Formatting RestrictionsEditing RestrictionsStart EnforcementTrack Changes Jenna does not have heart disease, but her family has a history of heart disease. Therefore, she is more likelyto get heart disease than the majority of the population. Jenna's doctor recommends a diet that is low insubstances that are known to contribute to heart disease. What best describes the doctor's recommendation?O disease treatmentO disease monitoringO disease preventionO disease trackingHi which of the following people is doing something profusely?A).A driver who glances in her rearview mirror.B).A boy who sneaks a cookie from the cookie jar.C).A man who purchases a shirt that is on sale.D).A child who cannot stop weeping. How does this document help explain why Americans repealed the 18th Amendment? need help what the awnser is.b - 6 = 21 If a numberis divisible by two co-prime numbers then it is also divisibe by their product What is the value of x in the diagram below? 2 right triangles are stacked. The bottom triangle has a side length of 9 units and an adjacent angle measure of 30 degrees. The top triangle has a hypotenuse length of x and an angle measure of 45 degrees. StartFraction 18 Over StartRoot 3 EndRoot EndFraction StartFraction 18 StartRoot 2 EndRoot Over StartRoot 3 EndRoot EndFraction StartFraction 18 StartRoot 3 EndRoot Over StartRoot 2 EndRoot EndFraction 18 StartRoot 2 EndRoot Mark this and return Plz help I really need it and would greatly appreciate it plz help asap i'll give brainlest Oxygen has 6 valence electrons. How many electrons does an atom of oxygen need to become stable?twofoursixeight It is important for interviewers to enlist client cooperation during the interview process? What legislation allowed the government toregulate big businesses like railroads and dissolvemonopolies? Which of the following most likely led to the situation depicted in the image on the left (View of BostonHarbor)?(1) British settlers imported wood from England to build large ships in Boston.(2) Colonial settlers excavated the shallow beach to create Boston harbor.(3) Naturally deep water and a sheltered harbor encouraged colonists to settle in Boston(4) The British army invaded Boston to claim it from the Spanish empire. HELPP!! ASAP this is do tomorrow!!! |5x2|=8 solve for xPls help plsss