Rosalind第39题:Finding a Shared Spliced Motif

Problem

A string  is a common subsequence of strings  and  if the symbols of  appear in order as a subsequence of both  and . For example, "ACTG" is a common subsequence of "AACCTTGG" and "ACACTGTGA".

Analogously to the definition of longest common substring,  is a longest common subsequence of  and  if there does not exist a longer common subsequence of the two strings. Continuing our above example, "ACCTTG" is a longest common subsequence of "AACCTTGG" and "ACACTGTGA", as is "AACTGG".

Given: Two DNA strings  and  (each having length at most 1 kbp) in FASTA format.

Return: A longest common subsequence of  and . (If more than one solution exists, you may return any one.)

的字符串是一个公共子串和如果所述符号 显示在顺序作为序列两者的和。例如,“ ACTG”是“ A A C C T T G G ”和“ A CA CTG TGA”的共同子序列。

类似的定义最长的公共子, 是一个最长公共子序列的和如果不存在这两个字符串较长公共子。继续我们上面的示例,“ ACCTTG”是“ A ACCTTG G”和“ AC A CT G TG A”的最长共同子序列,“ AACTGG ”也是。

给定:两个DNA串 ,(每个长度最多1 kbp)为FASTA格式

返回:中最长的公共子和。(如果存在多个解决方案,则可以返回任何一个。)

 

Sample Dataset

>Rosalind_23
AACCTTGG
>Rosalind_64
ACACTGTGA

Sample Output

AACTGG
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值