1-BiolaUniversityComputerScience.docVIP

  • 29
  • 0
  • 约5.99千字
  • 约 3页
  • 2017-05-07 发布于湖北
  • 举报
1-BiolaUniversityComputerScience

Algorithms: Test 3 on Dynamic Programming 1. Suppose you are given three strings of English letters X = x1x2…xm, Y = y1y2…ym, Z = z1z2…zm+n. The string Z is a shuffle of X and Y if and only if Z can be formed by interspersing the characters from X and Y in a way that preserves the left-to-right ordering of the characters from X and Y respectively. For example, cchocohilaptes is a shuffle of chocolate and chips, but chcccochilatspe is not. (i) Design a dynamic programming algorithm with that will determine whether Z is a shuffle of X and Y given any strings X,Y, and Z. (ii) Analyze the runn

文档评论(0)

1亿VIP精品文档

相关文档