How many cost units are spent in the entire process of performing 40 consecutive append operations on an empty array which starts out at capacity 5, assuming that the array will grow by a constant 2 spaces each time a new item is added to an already full dynamic array

Answers

Answer 1

Answer:

Explanation:

260 cost units, Big O(n) complexity for a push


Related Questions


Calculator is an example of
computer
A. analogue
B. hybrid
C. manual
D. digital
E. public​

Answers

D. digital

Explanation:

I hope it helps you

PartnerServer is a Windows Server 2012 server that holds the primary copy of the PartnerNet.org domain. The server is in a demilitarized zone (DMZ) and provides name resolution for the domain for Internet hosts.
i. True
ii. False

Answers

Answer:

i. True

Explanation:

A Domain Name System (DNS) can be defined as a naming database in which internet domain names (website URLs) are stored and translated into their respective internet protocol (IP) address.

This ultimately implies that, a DNS is used to connect uniform resource locator (URL) or web address with their internet protocol (IP) address.

Windows Server 2012 is a Microsoft Windows Server operating system and it was released to the general public on the 4th of September, 2012, as the sixth version of the Windows Server operating system and the Windows NT family.

PartnerServer is a Windows Server 2012 server that was designed and developed to hold the primary copy of the PartnerNet dot org domain.

Typically, the server is configured to reside in a demilitarized zone (DMZ) while providing name resolution for the domain of various Internet hosts.

In order to prevent a cyber attack on a private network, end users make use of a demilitarized zone (DMZ).

A demilitarized zone (DMZ) is a cyber security technique that interacts directly with external networks, so as to enable it protect a private network.

Write a program get_price.py with a function get_price() that takes a dictionary of fruits as an argument and returns the name of the most expensive fruit. Each item of the dictionary includes: A key: the name of the fruit A value: the price of the fruit.

Answers

Answer:

The program is as follows:

def get_price(fruits):

   AllPrice = fruits.values()

   value_iterator = iter(AllPrice)

   mostExpensive = next(value_iterator)  

   for item in fruits:

       if fruits[item]>=mostExpensive:

           mostExpensive = fruits[item]

           fruitName = item

   print(fruitName)

fruits = {}

n = int(input("Number of Fruits: "))

for i in range(n):

   name = input("Fruit name: ")

   price = int(input("Fruit price: "))

   fruits[name] = price

get_price(fruits)

Explanation:

This defines the get_price function

def get_price(fruits):

This gets all price in the dictionary fruit

   AllPrice = fruits.values()

This passes the values to a value iterator

   value_iterator = iter(AllPrice)

This initializes mostExpensive to the first price in the dictionary

   mostExpensive = next(value_iterator)

This iterates through the elements of the dictionary  

   for item in fruits:

If current element is greater than or equals most expensive

       if fruits[item]>=mostExpensive:

Set most expensive to the current element

           mostExpensive = fruits[item]

Get the corresponding fruit name

           fruitName = item

Print fruit name

   print(fruitName)

The main begins here

This initializes the fruit dictionary

fruits = {}

This gets input for the number of fruits

n = int(input("Number of Fruits: "))

This is repeated for every inputs

for i in range(n):

Get fruit name

   name = input("Fruit name: ")

Get fruit price

   price = int(input("Fruit price: "))

Append name and price to dictionary

   fruits[name] = price

Call the get_price function

get_price(fruits)

3. Write a program that prompts the user to input an integer that represents cents. The program will then calculate the smallest combination of coins that the user has. For example, 27 cents is 1 quarter, 0 nickle, and 2 pennies. That is 27=1*25+0*5+2*1.

Answers

Answer:

The program in Python is as follows:

cents = int(input("Cents: "))

qtr = int(cents/25)

cents = cents -qtr * 25

nkl = int(cents/5)

pny = cents -nkl * 5

print(qtr,"quarters,",nkl,"nickels,",pny,"pennies")

Explanation:

This gets input for cents

cents = int(input("Cents: "))

This calculates the quarters in cents

qtr = int(cents/25)

This gets the remaining cents

cents = cents -qtr * 25

This calculates the nickel in remaining cents

nkl = int(cents/5)

This calculates the pennies in remaining cents

pny = cents -nkl * 5

This prints the required output

print(qtr,"quarters,",nkl,"nickels,",pny,"pennies")

explain the working principle of computer? can anyone tell​

Answers

Answer:

input process and output hehe

g A catch block that expects an integer argument will catch Group of answer choices all exceptions all integer exceptions any exception value that can be coerced into an integer C

Answers

Answer:

Hence the correct option is 2nd option. all integer exceptions.

Explanation:

A catch block that expects an integer argument will catch all integer exceptions.

WHAT IS ONE WAY A PIVOTTABLE COULD COMBINE THE FOLLOWING DATA

Answers

Answer: You sort table data with commands that are displayed when you click a header arrow button. Hope it help's :D

The SEI/CERT website is full of best-practices for developing secure code for various popular programming languages. Select a software threat/vulnerability of your choice and idenitfy two secure coding practices to mitigate that threat/vulnerability. You may choose any programming language you wish.

Answers

Answer:  

Input-Output rule:  

char *file_name:

FILE *f+ptr;  

f_ptr = fopen(file_name, "w");

if(f_ptr == NULL){

}  

if(fclose(f_ptr)!=0){

}  

if(remove(file_name) !=0){

}  

Expression:  

void set_fl(int num ,int *s_fl){

if(NULL == s_fl){

return;

}  

if(num>0){

*s_fl =1;

}

else if(num <0) {

*s_fl = -1;

}

}  

int is_negative(int num) {

int s;

set_fl(num , &s);

return s<0;

Explanation:  

Computer Emergency Response Team(CERT) has found most vulnerabilities discovered in applications stem from a comparatively small number of common programming errors that developers repeatedly make. The CERT secure coding initiative is functioning to determine secure coding standards for commonly used programming languages and to advance the practice of secure coding.

There are many security coding practices:  

SEI CERT C coding standard:  

The C rules and proposals are a piece ongoing and reflect the present thinking of the secure coding community. As rules and proposals mature, they're published in report or book form as official releases.

give one advantage of saving file in the same folder

Answers

Answer:

it's easier to find

Explanation:

things are much more organized

So you don’t have to go through many files

What can be used to store data, plant viruses, or steal data?

Answers

Answer:

ITS A SIMPLE ANSWER BUT THE PROBLEM IS TOO BIG!

Explanation:

The phishing email might contain a link which on clicking will take you to a fake web page. For example, the link might take you to a fake bank website which looks very legitimate but in reality is just a lookalike. If the victim falls for the scam and enters his/her account details on the website, the details will actually go to the hacker's server instead of going to the bank and the hacker will have all the information that the victim has provided on the website.

(1)similarities between backspace key and delete key. (2) different between backspace key and delete key. (3) explain the term ergonomics. (4) explain the following. a click b right click double click d triple click e drag and drop.​

Answers

Answer:

ddhejaajegxhzi

Explanation:

jfrhsjadigugud

The internet's data pathways rely on what kind of hardware device to route data to its destination?
servers

routers

IP addresses

ISPs

Answers

Answer:

Routers

Explanation:

Essentially a router is a device used in networking that route packets of data from one computer network to another.

Answer:

routers

Explanation:

Routers are hardware devices that route the data from place to place. Data "hops" from one router to another until it reaches its destination. ISPs and IP addresses are not hardware devices. Servers are hardware devices but do not route data.

-Edge 2022

Over-activity on LinkedIn?

Answers

Answer:

Being over-enthusiastic and crossing the line always get you in trouble even if you’re using the best LinkedIn automation tool in the world.  

When you try to hit the jackpot over the night and send thousands of connection requests in 24 hours, LinkedIn will know you’re using bots or tools and they will block you, temporarily or permanently.    

This is clearly against the rules of LinkedIn. It cracks down against all spammers because spamming is a big ‘NO’ on LinkedIn.    

What people do is that they send thousands of connection requests and that too with the same old spammy templates, “I see we have many common connections, I’d like to add you to my network.”    

It will only create spam.    

The LinkedIn algorithm is very advanced and it can easily detect that you’re using a bot or LinkedIn automation tool and you’ll be called out on it.

Give examples of applications that access files by each of the following methods:
+ Sequentially.
+ Random.

Answers

Answer:

Explanation:

Usually, applications would have the capability of using either one of these options. But for the sake of the question here are some that usually prefer one method over the other.

Any program that targets an API usually uses Sequential access. This is because API's contain all of the data as objects. Therefore, you need to access that object and sequentially navigate that object to the desired information in order to access the data required.

A music application would have access to an entire folder of music. If the user chooses to set the application to randomly play music from that folder, then the application will use a Random Access method to randomly choose the music file to load every time that a song finishes.

5. A student wants to send a picture to the printer, how should they
send it?
a. 0,99,0
b. -65, 10, 5,0
c. 115, 118,0
d. #584504

Answers

Answer:

d

Explanation:

What values are in the vector named pressures after the following code is executed? vector pressures; pressures.push_back(32.4); pressures.push_back(33.5); pressures.insert(pressures.begin(), 34.2); int index = 2; pressures.insert(pressures.begin() + index, 31.8); pressures.push_back(33.3); index = 1; pressures.erase(pressures.begin() + index); a. 34.2, 31.8, 33.3 b. 34.2, 33.5, 31.8, 33.3 c. 34.2, 33.5, 33.3 d. 34.2, 31.8, 33.5, 33.3

Answers

Answer:

Hence the correct option is A that is "34.2 31.8 33.5 33.3".

Explanation:  

Program:-  

#include <iostream>

#include<vector>  

using namespace std;  

int main()

{

int count =0;

vector<double> pressures;

pressures.push_back(32.4);

pressures.push_back(33.5);

pressures.insert(pressures.begin(), 34.2);

int index = 2;

pressures.insert(pressures.begin() + index, 31.8);

pressures.push_back(33.3);

index = 1;

pressures.erase(pressures.begin() + index);

for (auto it = pressures.begin(); it != pressures.end(); ++it)

cout << ' ' << *it;

return 0;

}

25. Các phát biểu nào sau, phát biểu nào là đúng:
- tên file không được chứa khoảng trắng
- tên file không nên có dấu tiếng viết
- tên file được dài trên 255 ký tự
- tên file được chấp nhận ký tự khác

Answers


-tên file được chấp nhận ký tự khác

Peter is a new business owner. Because Peter is on a strict budget, he uses an older Novell NetWare server. The NetWare server still relies on the legacy IPX/SPX network protocol suite. Peter needs to connect his server to the Internet. He decides to use a gateway instead of a router. What is the likely motive behind Peter's decision

Answers

The most likely motive of Peter's decision to use a gateway for connecting his serve to the internet is to get a wireless connection for the internet.

A gateway server is used to communicate to the internet service provider. It is used to receives the data. It helps to sends the data to the router in order to translate as well as distribute the wireless devices.

In the context, Peter who is on a strict budget uses gateway system to connect to the internet and he uses the older version of Novell NetWare server.

Learn More :

https://brainly.in/question/35731153

Components of micro computer with diagram

Answers

Answer:

CPU, Program memory, Data memory, Output ports,  Input ports and Clock generator.

Explanation:

There are six basic components of a microcomputer which includes CPU, Program memory, Data memory, Output ports,  Input ports and Clock generator. CPU is the central processing unit which is considered as the brain of the computer. It is the part of a computer that executes instructions. Data memory is the place where data is stored that is present in the CPU.

Select the correct statement(s) regarding IP addressing.
a. IPv4 and IPv6 addressing is fully compatible with one another.
b. CIDR address format represents a Class C network only used within an intranet.
c. Subnet masks are used with both class and classless IP addresses.
d. all statements are correct.

Answers

Yeah the answer is b

Subnet masks are used with both class and classless IP addresses is the correct statement. Therefore, the correct option is C.

What is an IP address?

A device on the internet or a local network may be identified by its IP address, which is a special address. The rules defining the format of data delivered over the internet or a local network are known as “Internet Protocol,” or IP.

Only C is correct, rest other statements are incorrect because:

a. IPv4 and IPv6 addressing is fully compatible with one another is incorrect. While IPv4 and IPv6 can coexist on the same network, they are not fully compatible with one another.

b. CIDR address format represents a Class C network only used within an intranet is incorrect. Classless Inter-Domain Routing (CIDR) is a technique used to allocate IP addresses more efficiently.

Therefore, subnet masks are used with both class and classless IP addresses is the correct statement. Therefore, the correct option is C.

Learn more about,  here

https://brainly.com/question/3805118

#SPJ6

Neymar machine that Run on electricity

Answers

"Neymar" = "name a"?

if so, well, there are many, like the little glowing box you use the type questions to the brainliest community, let it be a phone, a pc, or a molded Nintendo

if you meant Neymar indeed, I'm not sure if he runs on electricity, unless he is a soccer playing android somehow.

Code Example 9-1 struct Product { string name; double price; int quantity; }; (Refer to Code Example 9-1.) Given a Product object named product, which of the following statements would you use to display the value of the name data member on the console? a. cout << product::name; b. cout << product.name; c. cout << product("name"); d. cout << product[0];

Answers

Answer:

a. cout << Product ::name;

Explanation:

Computer software use different languages which helps user to initiate command. When a user initiates command the results are displayed according to input command. If product name is required as output then insert command should be product::name; this will display names of different products present in the system.

You are going to purchase (2) items from an online store.
If you spend $100 or more, you will get a 10% discount on your total purchase.
If you spend between $50 and $100, you will get a 5% discount on your total purchase.
If you spend less than $50, you will get no discount.
Givens:
Cost of First Item (in $)
Cost of Second Item (in $)
Result To Print Out:
"Your total purchase is $X." or "Your total purchase is $X, which includes your X% discount."

Answers

Answer:

Code:-

using System;

using System.Collections.Generic;

class MainClass {

public static void Main (string[] args) {

int Val1,Val2,total;

string input;

double overall;

Console.Write("Cost of First Item (in $)");

      input = Console.ReadLine();

Val1 = Convert.ToInt32(input);

Console.Write("Cost of Second Item (in $)");

      input = Console.ReadLine();

Val2 = Convert.ToInt32(input);

total=Val1+Val2;

if (total >= 100)

{

overall=.9*total;

Console.WriteLine("Your total purchase is $"+overall);

}

else if (total >= 50 & total < 100)

{

overall=.95*total;

Console.WriteLine("Your total purchase is $"+overall);

}  

else

{

Console.WriteLine("Your total purchase is $"+total);

}  

}

}

Output:

Is IBM 1041, Minicomputer? Yes or no​

Answers

Answer:

No

Explanation:

College
START: what new information, strategies, or techniques have you learned that will increase your technology skills? Explain why its important to START doing this right away

Answers

Answer:

Read Technical Books. To improve your technical skills and knowledge, it's best to read technical books and journals. ...

Browse Online Tutorials. ...

Build-up online profile. ...

Learn new Tools. ...

Implement what you learned. ...

Enrich your skillset. ...

Try-out and Apply.

please give me correct answer

please give me very short answer​

Answers

Answer:

1.A table is a range of data that is defined and named in a particular way.

2.Table tools and layout

3.In insert tab Select the table and select the number of rows and colums

4.Split cell is use to split the data of a cell.Merge cell is used to combine a row or column of cells.

5.Select the cell and click down arrow next to the border button.

discribe two ways you can zoom in and out from an image

Answers

How to zoom in: u get any two of ur fingers and instead of going inward like ur tryna pop a zit, you go out

How to zoom out: pretend like ur popping pimples on ur phone/device screen

11111 Power 2 sovle ​

Answers

123,454,321. you just multiply 11111 by itself

Question No: 9 Of 50 Time Left : 59:18
ОА
QUESTION
Which of the following two entities (reading from Left to right) can be connected by the dot operator?
A class member and a class object.
A class object and a class,
A constructor and a member of that class.
OB
Ос
OD
A class object and a member of that class.

Answers

Answer:b

Explanation:

to get points

hi, please help me.solution.​

Answers

Answer:

aahdbdnsjajaissjdjdhskakwjdhbebs

Other Questions
How do you relate entrepreneurship and environment? does anyone on here use FLVS?? If so can u help with comprehensive science 5.06 conclusion part? what is the noun form of worried Directions: Read each question carefully and choose the best answer.Read the following statement made by President John F. Kennedy in 1961 and answer thequestion below.Recognizing the head start obtained by the Soviets ... which gives them many months of lead-time, and recognizing the likelihood that they will exploit this lead for some time to come instill more impressive successes, we nevertheless are required to make new efforts on our own.For while we cannot guarantee that we shall one day be first, we can guarantee that any failureto make this effort will make us last.1. Which action resulted from the events discussed by President Kennedy in this statement?A. acquiring territoryB. reunifying a nationC. eradicating a diseaseD. developing technologyReview the following information that describes methods used by the Student Non-ViolentCoordinating Committee, then answer the question below.STUDENT NON-VIOLENT COORDINATING COMMITTEE (SNCC) 19601966 Formed by college students involved in the first sit-ins at lunch counters Coordinated the Freedom Rides that showcased racial segregation in transportationParticipated in the March on Washington and other significant protest marches2. Which phrase best describes the methods used by this group?A. confrontation through legal actionB. resistance through civil disobedienceC. intimidation through aggressive actionsD. manipulation through artistic endeavors How did the shift toward dtente influence U.S. foreign policy during the Cold War?A. It allowed U.S. leaders to order attacks on communist stateswithout formally declaring war.B. It convinced U.S. leaders to provide more support to foreignanticommunist groups.C. It led U.S. leaders to avoid becoming involved in conflicts withcommunist groups.D. It pressured U.S. leaders to refuse any request to reduce the sizeof its nuclear arsenal. According to the Center for Media and Public Affairs (1999), scenes of seriousviolence (physical force) on televisionPlease help!!!!!!! could you pls teach me this question Please help me solve this short problem Manganese-55 has _____neutrons.55 Mn 25A. 55B. 30C. 25 Write anequationin slope y-intercept form B(-4,-3),m =Undefined Socio-emotional selectivity theory (SST) states that our goals and priorities usually change in midlife. Rather than long term goals, we become more concerned with life-satisfaction in the present. This in linked to a belief that which fraction has a greater value than 0.4 A washing machine heats 10kg of water in each wash cycle. How much energy is saved by washing at 30'c instead of 50'c if the starting temperature of the cold water is 16'c? The specific heat capacity of water is 4200 J/Kg'c Which sentence best completes the diagram?The Federal Reservedecreases the discount rate.A. Banks decrease their prime rate.B. The Open Market Committee buys treasury securities.C. Banks increase their prime rate.D. The Open Market Committee sells treasury securities. mt oto ang chy vi vn tc l 10m/s th tng tc v chuyn ng nhanh dn u sau 20s th t vn tc 14m/s a) tnh gia tc ca xeb) tnh vn tc xe sau 40s k t khi tng tc v qung ng xe i c trong thi gian true or false 1.complex buying behavior is when consumers search for information detals Guys please help me with this question Valid criticisms of evaluating performance based on return on investment (ROI) include managers may ______. Multiple select question. take actions that increase ROI in the short-run at the expense of long-term performance be put in charge of a business segment that includes committed costs over which a manager has no control reject investment opportunities that are profitable for the company but have a negative impact on a manager's ROI affect ROI by increasing sales or decreasing operating expenses for their division explain the charge distribution in polar molecule Which of these is the main cause of habitat fragmentation? O A. Reduction in genetic diversity O B. Migration of mammal species O C. Demand for land use O D. Extinction of bird species