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
hram777 [196]
3 years ago
15

Write a recursive method called lengthOfLongestSubsequence(a, b) that calculates the length of the longest common subsequence (l

cs) of two strings. For example, given the two strings aaacommonbbb and xxxcommonzzz the lcs is common which is 6 characters long so your function would return 6. The length of the lcs of two strings a
Computers and Technology
1 answer:
kompoz [17]3 years ago
4 0

Answer:

Explanation:

The following code is written in Java and creates the recursive function to find the longest common substring as requested.

 static int lengthOfLongestSubsequence(String X, String Y) {

       int m = X.length();

       int n = Y.length();

       if (m == 0 || n == 0) {

           return 0;

       }

       if (X.charAt(m - 1) == Y.charAt(n - 1)) {

           return 1 + lengthOfLongestSubsequence(X, Y);

       } else {

           return Math.max(lengthOfLongestSubsequence(X, Y),

                   lengthOfLongestSubsequence(X, Y));

       }

   }

You might be interested in
What are copyright laws? Authority to reprint an original work as long as it's not for profit Entitlement to use and sell anothe
Anastaziya [24]
I think it's the lest one: Rights given to original authors and creators to protect their work from unlawful use
5 0
3 years ago
Read 2 more answers
___________ is a task pane used to correct grammar errors; opens when you click the Spelling & Grammar button in the Proofin
BaLLatris [955]

Answer:

Spelling Task Pane

Explanation:

According to my research on Microsoft Office Studio, I can say that based on the information provided within the question the feature being mentioned in the question is called the Spelling Task Pane. By selecting this pane word will offer various grammar and spelling assistance, such as correcting words and offering one or more suggestions.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Read 2 more answers
Policies and procedures set by companies are established to :
frozen [14]

Answer:

The answer is below.

Explanations:

maintain the affairs or rules of conduct of the company, including both the employer and the employees.

The Policies and procedures set by companies will clearly state the responsibilities and duties of both employer and employees, which eventually serve as a means of protecting the interest of all the parties involved in a company.

4 0
3 years ago
In a flow chart, both the decision structure and the repetition structure use the diamond symbol to represent the condition that
leonid [27]

Answer:

Option A(True) is the correct answer for the above question.

Explanation:

  • The flowchart is used to give the solution of a problem through the diagram in a step by step processor. It helps the user to understand the solution easily. For diagram, it uses many types of symbols that are fixed for every sequence just like An oval symbol represents the start and end of the flowchart which is fixed for every flowchart.
  • So for the decisions in a flowchart, the diamond symbol is used which is to make the decisions and it has two sides-- one is true and the other is false.
  • The decisions are used also to represent the loop structure which is also called the repetition structure because the loop is controlled by the help of decisions so the diamond box is also used for the loop
  • The above question-statement says that the decisions-controlled is used for the loop and for the decisions which are true because it is also described above.
8 0
3 years ago
Describe one practical application of total internal reflection. ​
Delicious77 [7]

Answer:

The phenomenon of total internal reflection of light is used in many optical instruments like telescopes, microscopes, binoculars, spectroscopes, periscopes etc. The brilliance of a diamond is due to total internal reflection. Optical fibre works on the principle of total internal reflection.

Explanation:

thank me later but if it wrong. sorry

8 0
3 years ago
Other questions:
  • What is the primary criticism against a national identification system based on biometric data?
    13·1 answer
  • You will start by doing a bit of research on viewfinders and LCD displays on digital cameras. After you feel that you have an un
    10·1 answer
  • _____ refers to displaying information for the user's view.
    14·2 answers
  • Design and implement an application that reads a sequence of up to 25 pairs of names and postal (ZIP) codes for individuals. Sto
    9·1 answer
  • The mac group does not replace the primary functions of eocs or other dispatch organizations. True or False
    8·1 answer
  • The scheme function (mult2-diff Ist) should take one argument, a list of numbers, and results in multiplying each number in the
    11·1 answer
  • Which of the following represents the biggest difference between asymmetric and symmetric cryptography?
    9·1 answer
  • Question 4 (Multiple Choice Worth 5 points)
    6·1 answer
  • We combine the three binary bits 1, 0, and 1 to form 101 in order to represent the number 5. What does the leftmost 1 in 101 mea
    15·1 answer
  • This can change the fit of your respirator. A) A mustacheB) A beardC) Weight gainD) All of the above
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!