HOT DEAL 10-cent apps (android market)# PDA - 掌中宝
s*n
1 楼
Give you two sequences of length N, how to find the max window of matching
patterns. The patterns can be mutated.
For example, seq1 = "ABCDEFG", seq2 = "DBCAPFG", then the max window is 4. (
ABCD from seq1 and DBCA from seq2). 起始位置无需相同。
我一点头绪都没有,就想出了brutal force的办法。对方说可以利用都是N的特性,可
以sort,还是不懂。请教一下应该怎么做。
patterns. The patterns can be mutated.
For example, seq1 = "ABCDEFG", seq2 = "DBCAPFG", then the max window is 4. (
ABCD from seq1 and DBCA from seq2). 起始位置无需相同。
我一点头绪都没有,就想出了brutal force的办法。对方说可以利用都是N的特性,可
以sort,还是不懂。请教一下应该怎么做。