算法代码

it2024-12-13  19

package shen.utils; /** * Description: * User: shen60 * Date: 2018-03-11 * Time: 10:54 */ public class SuanFa { public static void main(String[] args) { } public static int getMaxChildStrLen(String str){ char [] strArr = str.toCharArray(); int maxLength = 0; for (int i=1; i<strArr.length-1; i++){ int len = checkLength(strArr,i); if(len > maxLength){ maxLength = len; } } return maxLength; } private static int checkLength(char[] strArr, int i) { int res = 0; if(strArr[i]==strArr[i+1]){ getFuLen(strArr,i,0); }else{ getDanLen(strArr,i,0); } return res; } private static int getDanLen(char[] strArr,int position, int distance) { if(position-distance > -1 && position+distance < strArr.length){ if(strArr[position-distance]==strArr[position-1]){ } } return position*2+1; } private static int getFuLen(char[] strArr,int position, int distance) { return 0; } }

  

转载于:https://www.cnblogs.com/shenbo-/p/8546563.html

相关资源:SIFT算法源码 个人修正过后的版本 改进了其问题
最新回复(0)