1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Rzqust [24]
3 years ago
15

Which of the following data structures can erase from its beginning or its end in O(1) time?

Computers and Technology
1 answer:
11111nata11111 [884]3 years ago
8 0

Where all "the following" i can help you but you said which of the folllowing and ther no picture or anything?

You might be interested in
Write a program in C++ to Find the Average of the sum of prime numbers between 1 to any given number
mixas84 [53]

Using the knowledge in computational language in C++ it is possible to write a code that Find the Average of the sum of prime numbers between 1 to any given number

<h3>Writting in C++ code:</h3>

<em />

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>bool isPrime(int n){</em>

<em>   for(int i = 2; i < n/2; i++){</em>

<em>      if(n%i == 0){</em>

<em>         return false;</em>

<em>      }</em>

<em>   }</em>

<em>   return true;</em>

<em>}</em>

<em>int findPrimeSum(int n){</em>

<em>   int sumVal = 0;</em>

<em>   for(float i = 2; i <= n; i++){</em>

<em>      if(isPrime(i))</em>

<em>         sumVal += i;</em>

<em>   }</em>

<em>   return sumVal;</em>

<em>}</em>

<em>int main(){</em>

<em>   int n = 15;</em>

<em>   cout<<"The sum of prime number between 1 to "<<n<<" is "<<findPrimeSum(n);</em>

<em>   return 0;</em>

<em>}</em>

See more about C++ code at brainly.com/question/19705654

#SPJ1

8 0
1 year ago
Name two driving factors in the development of computers.
sertanlavr [38]

The two driving factors in the development of computers are the  Skill set of the team. [If the team is well versed in a specific stack, then the performance will be good as compared to any other stack].

<h3>What re the matters?</h3>

There are some matters to consider. For business programs, I'd say gaming. A lot of what the common laptop makes use of for enterprise doesn't require that kind of electricity.

  1. The skill set of the team. [If the team is well versed in a specific stack, then the performance will be good as compared to any other stack]
  2. Process familiarity. [If dev team knows the stack but the deployment/service team is new, then you may run into deployment and maintenance issues.]

Read more about the computers:

brainly.com/question/24540334

#SPJ1

8 0
2 years ago
Jared makes two copies of an antivirus software package he just bought and sells one of the copies to Joshua. In this scenario,
sladkih [1.3K]

Answer: d) Illegal and unethical

Explanation:  Illegal term is used for the something that is incorrect according to regulation.The legal factor is not present in this type of activity and thus it is judged by the regulations as unauthorized act and can be concluded as act of crime .

Unethical term defines that something is incorrect in a moral way and the person doing the unethical activity lacks the principles in his/her nature.

Jared is also performing illegal act by selling the piracy  antivirus package of software .The act is unethical as well because Jared is lacking the basic morals e.g.-stealing is offensive and incorrect act.Thus the correct option is option(d).

Other options are incorrect because the  act done by Jared is against the conduct which is not legal and ethics are moral features which is not present in Jared's act.

5 0
3 years ago
write an application to presell a limited number of cinema tickets. each buyer can buy as many as 4 tickets. No more than 100 ti
Rus_ich [418]

Answer:

The program for this question can be given as:

Program:

import java.util.*;  //import package

public class TicketSeller  //define class

{

public static void main(String ar[])  //main method

{

int totalTickets=100,userCount=0,remainingTickets=100,numTickets; // varaibale

try           //try block

{

Scanner ob= new Scanner(System.in);  //input by user

System.out.println("Total Tickets:"+totalTickets);

while(remainingTickets!=0)          //loop

{

System.out.print("Enter no of Tickets to buy:");      //message.

numTickets=ob.nextInt(); //taking input

if(numTickets<=4)         //conditional statements.

{

if(remainingTickets>=numTickets)

{

remainingTickets=remainingTickets-numTickets;              //calculate remainingTickets

userCount++;

System.out.println("remaining tickets : "+remainingTickets+" user :"+userCount);      

}

else

{

System.out.println("Invalid Input");

}

}

else

{

System.out.println("Invalid Input");

}

}

}

catch(Exception e)            //catch block.

{

}

}

}

Output:

Total tickets:100

Enter no of Tickets to buy: 4

Remaining tickets : 96 User :1

Enter no of Tickets to buy: 4

Remaining tickets : 92 User :2

Enter no of Tickets to buy: 4

Remaining tickets : 88 User :3

.

.

.

Enter no of Tickets to buy: 4

Remaining tickets : 0 User :25

Explanation:

In the above Program firstly we import the package for the user input. Then we declare the class that is (TicketSeller) given in question. In this class we declare the main method in the main method we declare the variable that is totalTickets, userCount, remainingTickets and numTickets .Then we use the exception handling. we use this for providing the validation from the user side that users don't insert value less the 4. In the exception handling, we use the multiple catch block with try block. Then we input from the user and calculate the values and in the last, we print all the values.

8 0
3 years ago
The following code segment is supposed to read all of the lines from test.txt and save them in copy.txt. infile = open("test.txt
alukav5142 [94]

Answer:

The line of code that should be placed is

while line:

The entire code should be as follows:

  1. infile = open("test.txt", "r")
  2. outfile = open("copy.txt", "w")
  3. line = infile.readline()
  4. while line:
  5.    outfile.write(line)
  6.    line = infile.readline()
  7. infile.close()
  8. outfile.close()

Explanation:

The Python built-in function <em>readline() </em>will read one line of text from <em>test.txt</em> per time. Hence, the code in Line 3 will only read the first line of text from <em>test.txt</em>.

To enable our program to read all the lines and copy to <em>copy.txt</em>, we can create a <em>while </em>loop (Line 5) to repeatedly copy the current read line to <em>copy.txt </em>and proceed to read the next line of text from<em> test.txt </em>(Line 6 -7).

"while line" in Line 5 means while the current line is not empty which denotes a condition of True, the codes in Line 6-7 will just keep running to read and copy the text until it reaches the end of file.

5 0
3 years ago
Other questions:
  • What is the output of this code? import java.util.HashSet; class A { public static void main(String[ ] args) { HashSet set = new
    15·1 answer
  • Assume the existence of a Building class with a constructor that accepts two parameters:_________ a reference to an Address obje
    5·1 answer
  • Edmund wants to visit his university's website. Which software application would he use?
    14·1 answer
  • A cyberbully is someone who invades another person’s privacy by
    13·2 answers
  • EDI stands for__________________ a) Electronic digital interface b) Electronic data interchange c) Enterprise data interface d)
    5·1 answer
  • Why can black holes not be seen?
    5·1 answer
  • What will Jason need to assemble a microcomputer and connect it to memory chips
    8·1 answer
  • Write a program that reads in the following data, all entered on one line with at least one space separating them: a) an integer
    13·1 answer
  • The conversion rate is the percentage of what? A. Customers who received cold calls B. Sales leads who reached the interest stag
    13·1 answer
  • Write a function solution that given an array a of n integers (between -100 and 100), returns the sign (-1,0,1) of product of al
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!