int iMultiCount = 0;
int iMultiCountContinued = 0;
int iBegion = Integer.parseInt(alSequence.get(0).toString());
for (int i = 0; i < alSequence.size(); i++) {
if (i > 0 && Integer.parseInt(alSequence.get(i).toString()) == Integer.parseInt(alSequence.get(i - 1).toString())) {
iMultiCount++;
} else {
iMultiCount = 0;
}
iMultiCountContinued = iMultiCount;
for (int j = 0; j < alAll.size(); j++) {
strLineContent = alAll.get(j).toString();
if (strLineContent.substring(0, iSequenceLength).trim().equals(alSequence.get(i).toString())) {
if (iMultiCountContinued > 0) {
iMultiCountContinued--;
continue;
}
alForNew.removeAll(alForNew);
strLineContent = strLineContent.replace(strLineContent.substring(0, iSequenceLength).toString(), ((iBegion+i) + " ").substring(0, iSequenceLength));
alForNew.add(strLineContent);
String
最新推荐文章于 2024-06-28 10:04:51 发布
本文介绍了一种用于检测并更新特定序列中重复元素的算法。该算法遍历输入序列,跟踪连续重复元素的数量,并在另一数据集合中进行模式匹配,替换指定长度的序列,确保更新的准确性。
7794

被折叠的 条评论
为什么被折叠?



