Your program will be used by many departments at the university. Your comments will be important to their IT people. What would be a useful comment?

This was a really hard part to write, but it finally works.

I’m not sure what this does, but I don’t have time to troubleshoot it.

This segment returns a value that is used by the segment marked B.

Answers

Answer 1

Answer:

This segment returns a value that is used by the segment marked B.

Explanation:

just took assigment

Answer 2

Answer:

C

Explanation:


Related Questions

When it comes to having certain sales skills as a hotel manager, being able to really hear, learn about, and show customers that the products/services you offer will meet their needs is a vital skill to have. When you show customers that you truly hear their needs, what sales skill are you practicing?
active listening
product knowledge
communication
confidence

Answers

Answer:

Communication

Explanation:

The ability to communicate clearly when working with customers is a key skill because miscommunications can result in disappointment and frustration. The best customer service professionals know how to keep their communications with customers simple and leave nothing to doubt.

Two character strings may have many common substrings. Substrings are required to be contiguous in the original string. For example, photograph and tomography have several common substrings of length one (i.e., single letters), and common substrings ph, to, and ograph as well as all the substrings of ograph. The maximum common substring length is 6. Let X = X122 . Im and Y = yıy2 - - • Yn be two character strings. Using dynamic programming, design an algorithm to find the maximum common substring length for X and Y using dynamic programming. Please follow the general steps for designing a dynamic programming solution as in Q1 (other than the actual programming part).

Answers

Answer:

Explanation:

The following function is written in Java. It takes two strings as parameters and calculates the longest substring between both of them and returns that substring length.

import java.util.*;

class Test

{

   public static void main(String[] args)

   {

       String X = "photograph";

       String Y = "tomography";

       System.out.println(X + '\n' + Y);

       System.out.println("Longest common substring length: " + longestSub(X, Y));

   }

   static int longestSub(String X, String Y)

   {

       char[] word1 = X.toCharArray();

       char[] word2 = Y.toCharArray();

       

       int length1 = X.length();

       int length2 = Y.length();

       int substringArray[][] = new int[length1 + 1][length2 + 1];

       int longestSubstringLength = 0;

       

       for (int i = 0; i <= length1; i++)

       {

           for (int j = 0; j <= length2; j++)

           {

               if (i == 0 || j == 0)

                   substringArray[i][j] = 0;

               else if (word1[i - 1] == word2[j - 1])

               {

                   substringArray[i][j]

                           = substringArray[i - 1][j - 1] + 1;

                   longestSubstringLength = Integer.max(longestSubstringLength,

                           substringArray[i][j]);

               }

               else

                   substringArray[i][j] = 0;

           }

       }

       return longestSubstringLength;

   }

}

Other Questions
Rationalize the denominator and simplify Explain why it is wrong to refer to the side of the moon that always faces away from Earth as the dark side of the moon? pls use your own words Read the text.He raised his hand enthusiastically and said, Me, me, me!Which sentence correctly embeds the quotation?Select one:He enthusiastically raised his hand, Me, me, me.The sentence is correct as it is.He said Me, me, me, While enthusiastically raising his hand.He said: Me, me, me, with his hand raised enthusiastically. Please help me this is for a test. Thank you so much whoever answers this. Two character strings may have many common substrings. Substrings are required to be contiguous in the original string. For example, photograph and tomography have several common substrings of length one (i.e., single letters), and common substrings ph, to, and ograph as well as all the substrings of ograph. The maximum common substring length is 6. Let X = X122 . Im and Y = yy2 - - Yn be two character strings. Using dynamic programming, design an algorithm to find the maximum common substring length for X and Y using dynamic programming. Please follow the general steps for designing a dynamic programming solution as in Q1 (other than the actual programming part). A box holds 30 tins How many boxes can be filledwith 810 tins Carbon is an organic element found in all life forms. Which of the following occurs through the process ofbreaking down carbon-based molecules?A. Water molecules are transferred through the body.B. Elimination of waste products occurs.C. Energy needed for life functions is released.D. Absorbing of oxygen through pores occurs. The pattern of the conclusion is opposite that of the introduction because it ____.begins with a specific statement and moves to general statementsbegins with the general and moves to the specific Please helpppppp! WILL GIVE BRAINLIEST!!! Hey guys, What are some good songs that start with the letter Z HELP Select the correct answer.What theme is the main theme of this excerpt from The Metal Pig by Hans Christian Andersen?In the garden of the grand duke's palace, under the roof of one of the wings, where a thousand roses bloom in winter, a little ragged boy had been sitting the whole day long. The boy might serve as a type of Italy: lovely and smiling, and yet suffering. He was hungry and thirsty, but no one gave him anything; and when it became dark and they were about to close the gardens, the porter turned him out. A long time he stood musing on the bridge which crosses the Arno and looking at the glittering stars that were reflected in the water which flowed between him and the wonderful marble bridge Delia Trinit. He then walked away towards the Metal Pig, half knelt down, clasped it with his arms, and, putting his mouth to the shining snout, drank deep draughts of the fresh water. Close by lay a few salad leaves and two chestnuts, which were to serve for his supper. No one was in the street but himself. It belonged only to him. He boldly seated himself on the pig's back, leaned forward so that his curly head could rest on the head of the animal, and, before he was aware, fell asleep. It was midnight. The Metal Pig raised himself gently, and the boy heard him say quite distinctly, "Hold tight, little boy, for I am going to run"; and away he started for a most wonderful ride. First they arrived at the Piazza del Granduca, and the metal horse which bears the duke's statue neighed aloud.A. lonelinessB. magicC. hungerD. crueltyRes Fill in the blank with the future tense of the verb in parenthesis.Il dix ans. (avoir)avoiraauraauraiauront 7 2/5 - 3 1/8=Another one Explain why the backbone of large macromolecules is made of carbon atoms rather than hydrogen atoms Pls help!!! Urgent!List two factors that pushed African Americans out of the South after Reconstruction and two factors that pulled the toward theNorth. Can someone pleaseeee help and if youre correct ill give brainliest please help me with this question:( In anecosystem, marsh snails feedon phytoplankton and painted turtlesfeed on marsh snails. Pollution has resulted in the depletion ofphytoplankton. What effect would this situation likely have on the populationsof marsh snails and painted turtles? Damon buysabaseballhelmetonlinefor$16.Ifshippingandhandlingareanadditional20%oftheprice,howmuchshippingandhandlingwillDamonpay? how do i solve a division problem