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
Example of vector image format​
emmasim [6.3K]

Answer:

JPEGs, GIFs and PNGs are common raster image types. ...

Vector images, alternatively, allow for more flexibility. Constructed using mathematical formulas rather than individual colored blocks, vector file types such as EPS, AI and PDF* are excellent for creating graphics that frequently require resizing.

7 0
3 years ago
I found a brand-new charger wire still in its plastic package, but it's six years old and has never been used. Is it safe to use
Oduvanchick [21]

Answer:

Yes it should be safe

Explanation:

hope it helps :)

3 0
3 years ago
suspect that several users are attempting to install unauthorized software. Upon researching, you discover that the attempts wer
pochemuha
Two factor authentication? I’m not sure
3 0
3 years ago
Which of the following describe design themes in PowerPoint? Choose all that apply.
astraxan [27]

Answer:

A. color scheme.

B. colors, fonts, and formatting that coordinate.

C. set of elements that unify your slides and complement your topic.

Explanation:

PowerPoint application can be defined as a software application or program designed and developed by Microsoft, to avail users the ability to create various slides containing textual and multimedia informations that can be used during a presentation.

Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

To format an image on PowerPoint, you can either use the Artistic Effects or Picture Effects.

The Picture Effects gallery allows a user to access a variety of preconfigured formatting styles for images that are added to a PowerPoint presentation.

Basically, the Picture Effects consist of the following preconfigured formatting styles; transparent shadow, soft edge, reflection, glow, 3-D rotation, metal frame, bevels, perspectives etc.

The design themes in PowerPoint are described by the following;

A. Color scheme.

B. Colors, fonts, and formatting that coordinate.

C. Set of elements that unify your slides and complement your topic.

6 0
3 years ago
04. Suppose a computer program needs to sort a list of student records in ascending order
34kurt

Answer:

D) ["Kathy Bones", "Jill Brewer", "Joe Schnook", "Tom Smith"]

Explanation:

The context of the problem explains a computer program that sorts names in "ascending order" (A to Z) since the ASCII table has capital A start a lower number and it increases from there to capital Z.

Notice how the attached file, which is a portion of the ASCII table, shows that letters after A are also higher in decimal value than the previous letter.

With this in mind, we know that all this program does is sort by last name alphabetical order. From there, just sort the given names using that same criteria, last name alphabetical order, and the correct answer is determined.

<em>Please put "Brainliest" on my answer if it helped you out!</em>

<em>If you want to learn more about this subject, you can search:</em>

<em>- ASCII Table</em>

<em>- Lists in Programming</em>

<em>- Sorting Procedures</em>

7 0
2 years ago
Other questions:
  • Package hw1;
    10·1 answer
  • For which product would the producer keep a high profit margin and offer after-sales service?
    6·1 answer
  • The Python print function
    9·1 answer
  • In this problem, you will write three methods to:
    12·1 answer
  • Which cable would you check if you can't access any web pages?
    12·1 answer
  • g Write a recursive function all capital (L,start ,stop) that takes a string L and two integers. It returns a Boolean (True/Fals
    8·1 answer
  • Brian needs to see the space available to insert content on a slide in his presentation which feature of the presentation should
    10·1 answer
  • Components of document merging?
    5·1 answer
  • What action should you take if you become aware that sensitive compartmented information has been compromised
    14·1 answer
  • What is the main coding language for netflix?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!