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
mote1985 [20]
3 years ago
12

A shuffle of two strings X and Y is formed by interspersing the characters into a new string, keeping the characters of X and Y

in the same order. For example, the string BANANA ANANAS is a shue of the strings BANANA and ANANAS in several different ways.
BANANAANANAS BANANAANANAS BANANANANA

Similarly, the strings PRODGYRNAMAMMIINCG and DYPRONGARMAMMICING are both shuffles of DYNAMIC and PROGRAMMING:

PROGRAMMING PROGRAMMING

Describe and analyze an efficient algorithm to determine, given throe strings A1 [1...m], B [1...n] and C[1...m+n], whether C is a shuffle of A and B.
Computers and Technology
1 answer:
levacccp [35]3 years ago
3 0

Shuffle (A[1..m], B[1..n], C[1..m+n]):

Shuf[0, 0] ← True

for j ← 1 to n

Shuf[0, j] ← Shuf[0, j − 1] ∧ (B[j] = C[j])

for i ← 1 to n

Shuf[i, 0] ← Shuf[i − 1, 0] ∧ (A[i] = B[i])

for j ← 1 to n

Shuf[i, j] ← False

if A[i] = C[i + j]

Shuf[i, j] ← Shuf[i, j] ∨ Shuf[i − 1, j]

if B[i] = C[i + j]

Shuf[i, j] ← Shuf[i, j] ∨ Shuf[i, j − 1]

return Shuf[m, n]

The algorithm runs in O(mn) time.

You might be interested in
The objectivity of a site relates to its a. Appearance c. Graphics b. Biases d. Quotes from other Internet authors Please select
FromTheMoon [43]

The objectivity of any site is related to the biases present in the content of the site because it creates an imbalance of information and it is unfair.

<h3>What is the objectivity of a site?</h3>

The content in a site represents the thoughts of a specific author. Objectivity comes to the role when there is an imbalance in the data or information available on the site.

The information available on the site represents the opinion that helps readers to understand or decide on anything. When the information is fair completely balanced then it becomes fair for the users to refer to that content. But when the data is biased or unbalanced then it becomes a problem.

Therefore, the objectivity of any site is related to the biases present in the content of the site because it creates an imbalance of information and it is unfair.

Learn more about objectivity of a site here:

brainly.com/question/2018782

5 0
2 years ago
Google Docs, MS Word, Google Slides, MS PowerPoint, Google Sheets, MS Excel In your opinion which software in each category is e
podryga [215]

Answer:

I my opinion Google software is easier to use.

Explanation:

It is more upgraded and it's basically like kind of the latest version of Microsoft Software

This is just my opinion, I use Google Applications for every single thing in  my life

7 0
3 years ago
Read 2 more answers
How to get a satellite image of something or someplace?
iogann1982 [59]
You go onto google maps and type the name in 
5 0
3 years ago
Why does Microsoft release new versions of its Windows operating system every few years?
Korolek [52]
A to keep up with advances in computer capabilities
8 0
4 years ago
C) Explain GIGO briefly.​
hodyreva [135]

Answer:

Is is also a computer science acronym that implies bad input will result in bad output. Requiring valid input also helps programs avoid errors that can cause crashes and other erratic behavior.

IT'S FORMULA IS GIGO: GARBAGE IN GARBAGE OUT...

HOPE IT'S HELPFUL FOR U!!

AND PLZ MARK ME AS BRAINLIEST IF U LIKE THIS ANSWER!!!!

4 0
3 years ago
Other questions:
  • Explain how abstraction is used in a GPS system
    12·2 answers
  • Discuss how advertising on the Web affects search results and the ethical dilemmas associated with it.
    5·1 answer
  • What is the difference between requirements and controls in the security process? Give examples of each.
    11·1 answer
  • What technology would you like to use or see developed that would help you be a "citizen of the world"?
    5·1 answer
  • In this project you will demonstrate your knowledge of decision making blocks such as if statements. Objectives Building on ever
    11·1 answer
  • What does it mean to catch an exception?
    8·1 answer
  • Block elements start a new line when rendering? (true or false)
    7·1 answer
  • D Question 9 What is output by the following?
    5·1 answer
  • The digital EGR valve used on GM 3800 engines allows for how many different EGR flow rates?
    15·1 answer
  • Which is an effect of short-term environmental changes?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!