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
Pepsi [2]
2 years ago
9

In order to detect repeated lines anywhere in the input, myuniq must keep track of all of the lines it has seen as it moves thro

ugh the input. It will also need to count the frequency for each line. An array of structs to store this information seems like just the tool for the job, but we have a conundrum. How many entries do we need for this array
Computers and Technology
1 answer:
andrew11 [14]2 years ago
7 0

Answer:

Explanation:

The two solutions to this problem would be to either count the number of total lines in the input file and initialize the array with the exact number of lines, or use an ArrayList. The first solution would work since it would analyze the file first in order to make sure the array will fit every input line. The second solution will also work since ArrayLists are dynamic and do not have a fixed size. You can simply continue adding to the ArrayList and it will adjust its size accordingly.

You might be interested in
Every character is represented by a code. The ASCII code for upper letter A is 65 and for lower a is 97. Similarly the numeric c
Anni [7]
True! And also quick fact there’s another thing that has thousands of codes for different languages as well. Also emojis are represented as codes
8 0
3 years ago
An Internet user has a need to send private data to another user. Which of the following provides the most security when transmi
Nezavi [6.7K]

Answer:

C. Sending the data using public-key encryption

Explanation:

Encryption is the only choice that provides security.

6 0
3 years ago
Read 2 more answers
1. A device that can be used to insert data into a computer or other computational devices is
Pie

Answer:

Examples of input devices include keyboards, mouse, scanners, digital cameras, joysticks, and microphones.

Explanation:An input device is a piece of computer hardware equipment used to provide data and control signals to an information processing system such as a computer or information appliance.

7 0
3 years ago
Read 2 more answers
$8.25/hour; _____$/year, when working 40 hours a week.
Katarina [22]
If you work 50 weeks/year and 40 hours/week, you will make 16,500 dollars per year if you make 8.25 per hour
8 0
3 years ago
Assume that word is a variable of type String that has been assigned a value. Assume furthermore that this value always contains
Valentin [98]

Answer:

   String word = "George slew the dragon";

   

   int pos = word.indexOf("dr");    

   String drWord = word.substring(pos, pos+4);

   

   System.out.println(drWord);

Explanation:

Assuming dr is always there, we don't have to check the validity of 'pos'. Normally, you would!

5 0
3 years ago
Read 2 more answers
Other questions:
  • In this assignment, you are going to add conditional formatting to the spreadsheet you used in the previous
    13·1 answer
  • In a video, a motionless image is called
    7·2 answers
  • What should be included as part of the approval process? in relation to computer forensics
    14·1 answer
  • You are adding new wires in your building for some new offices. The building has a false ceiling that holds the lights and provi
    8·1 answer
  • IPhone + iPad + iPod + iPod touch + iMac + MacBook + iBook + Apple =???
    11·2 answers
  • Write a program that first reads in the name of an input file, followed by two strings representing the lower and upper bounds o
    8·1 answer
  • You want to use a terminal program to terminal into a cisco router. what protocol should i use
    8·1 answer
  • Write a program that asks the user to enter the size of a triangle (an integer from 1 to 50). Display the triangle by writing li
    14·1 answer
  • Which of the following statement is correct? Select one: a. Base register holds the size of a process. b. Limit register holds t
    10·1 answer
  • Excel files have a default extension of ?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!