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
Which option is the primary means of communication for coauthors working on PowerPoint presentations?
nasty-shy [4]

Answer:

Comments

Explanation:

The fastest method of communication, and allows everyone that has access to the PowerPoint to see it.

4 0
3 years ago
You started using a new Windows server three months ago. Since that time, you have found that the system slows down and crashes
Brut [27]

Answer: Open Reliability Monitor.

Explanation:

The simplest way to view this information is to open the reliability monitor.

The Reliability Monitor shows you the stability history of a system at a glance and also allows one to see the details of the events that has an effect on reliability on a daily basis.

The reliability and problem history chart which can be seen in the Reliability Monitor helps in keeping track of the overall health of the server on a daily basis.

4 0
3 years ago
Why is it essential to know what information will be needed from the database from the outset of development?
KIM [24]

Answer:

all of the answers

Explanation:

According to my research on information technology, I can say that based on the information provided within the question all of the answers provided would be important pieces of information to know. This is because each provides information on another and all information possible is helpful in a development process.

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

7 0
4 years ago
Find the error in the following code fragment. int a: System.out.print(a):​
trapecia [35]

Answer:

If your using java, then its supposed to be "System.out.print("a")"    

Explanation:

its supposed to have quotations

7 0
3 years ago
What is a computer system model and explain?
nirvana33 [79]

Answer:

Systems modeling or system modeling is the interdisciplinary study of the use of models to conceptualize and construct systems in business and IT development. A common type of systems modeling is function modeling, with specific techniques such as the Functional Flow Block Diagram and IDEF0.

Explanation:

have a great day

8 0
3 years ago
Other questions:
  • Write a program that takes nouns and forms their plurals on the basis of these rules:
    8·1 answer
  • Data mining must usestatistics to analyze data.<br> True<br> False
    12·1 answer
  • Assessing opportunity cost involves...
    6·1 answer
  • Our readings so far explored computer hardware and software, in particular operating systems and application software. There are
    11·1 answer
  • Minerals can form deep inside Earth’s crust by
    13·1 answer
  • What is the grooming process as it relates to online predators?
    12·2 answers
  • Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation onc
    14·1 answer
  • Which of the following is not considered a system component that can be found inside a computer? A-CPU B-RAM C-PCIe graphics ada
    6·1 answer
  • HAIIIIIII ANYONE FEELING JOLLY OR SAD
    9·2 answers
  • 10<br> Which of the following is not one of the most popular Spreadsheet software applications?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!