Rosalind第51题:Interleaving Two Motifs

Problem

string  is a supersequence of another string  if  contains  as a subsequence.

common supersequence of strings  and  is a string that serves as a supersequence of both  and . For example, "GACCTAGGAACTC" serves as a common supersequence of "ACGTC" and "ATAT". A shortest common supersequence of  and  is a supersequence for which there does not exist a shorter common supersequence. Continuing our example, "ACGTACT" is a shortest common supersequence of "ACGTC" and "ATAT".

Given: Two DNA strings  and .

Return: A shortest common supersequence of  and . If multiple solutions exist, you may output any one.

一个字符串 是一种超层另一个字符串 如果  包含  作为子序列

一个常见的超序列串 和  是一个字符串,两者都作为  和 。例如,“ GACCTAGGAACTC”用作“ ACGTC”和“ ATAT”的通用超序列。一个最短共同超序列的 和 是一个超序列,对于该超序列不存在较短的通用超序列。继续我们的示例,“ ACGTACT”是“ ACGTC”和“ ATAT”的最短常见超序列。

给出:两个DNA字符串  和 。

返回:的最短公共超序列 和 。如果存在多个解决方案,则可以输出任何一个。

Sample Dataset

ATCTGAT
TGCATA

Sample Output

ATGCATGAT
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值