摘要:        
private static final int ONE_YEAR_GROWTH_SUMMER_FACTOR=1;private static final int UTOPIANTREE_INITIALIZE_HEIGHT=1; /** * compute the hight of utopianT    
阅读全文
posted @ 2025-03-24 07:30
CoderOilStation
阅读(8)
推荐(0)
 
		
    
        
        
摘要:        
/** * 判断不同的起始坐标袋鼠在经历过多少次起跳之后是否可以达到相同的终点 * 坐标是x轴的坐标,起跳单元是x轴单元坐标的倍数v * 约束 * 0<=x1<x2<=10000 * 1<=v1<=10000 * 1<=v2<=10000 * @param x1 * @param v1 * @par    
阅读全文
posted @ 2025-03-22 17:37
CoderOilStation
阅读(17)
推荐(0)
 
		
    
        
        
摘要:        
/** * 压缩或者解压缩字符串 aaaaddcccmmm-> 4a2d3c3m * 3c4f3d-> cccffffddd * @return */public static String zipOrUnZipStr(String srcStr){ if (srcStr==null || srcS    
阅读全文
posted @ 2025-03-21 15:46
CoderOilStation
阅读(13)
推荐(0)
            
        
        
摘要:        
/** * 对字符串加密 */public static String encodeStr(String srcDecodeStr){ if (srcDecodeStr == null || srcDecodeStr.trim().isEmpty()) { System.out.println("输    
阅读全文
posted @ 2025-03-21 07:59
CoderOilStation
阅读(32)
推荐(0)
 
		
    
        
        
摘要:        
/** * 求输入整形数字的质数因子 * @param srcNumStr */public static List<Integer> getPrimFactorList(String srcNumStr){ if (srcNumStr==null){ System.out.println("请输入    
阅读全文
posted @ 2025-03-20 08:55
CoderOilStation
阅读(8)
推荐(0)
 
		
    
        
        
摘要:        
/** * 获取根据字母出现频率排序的字符串(出现频率低的排在前,频次相同根据字母从小到大排序,只限小写字母) aaddccdc ->2a3c3d -> dca * @param srcStr * @return */public static String getOrderedStr1(Strin    
阅读全文
posted @ 2025-03-19 17:11
CoderOilStation
阅读(9)
推荐(0)
 
		
    
        
        
摘要:        
package com.javaTest; import java.util.ArrayList;import java.util.HashSet;import java.util.List;import java.util.Objects;import java.util.Random;impor    
阅读全文
posted @ 2025-03-17 18:18
CoderOilStation
阅读(18)
推荐(0)
 
		
    
        
        
摘要:        
/** * count apples and oranges whether land on the inclusive [s,t] * a is apple tree's cordination, b is orange tree's corditation * apples is apple t    
阅读全文
posted @ 2025-03-15 18:19
CoderOilStation
阅读(11)
推荐(0)
            
        
        
摘要:        
/** * 获取不重复的字符串 * aabbc->abc * @param srcStr * @return */public static String getSingleCharStr(String srcStr){ if (srcStr==null){ return null; } if (s    
阅读全文
posted @ 2025-03-15 07:45
CoderOilStation
阅读(264)
推荐(0)
 
		
    
        
        
摘要:        
/** * 获取两个字符串的最长重复子串 * @param srcStr1 * @param srcStr2 * @return */public static String getMaxLenRepeatedSubStr(String srcStr1,String srcStr2){ if (sr    
阅读全文
posted @ 2025-03-13 10:46
CoderOilStation
阅读(24)
推荐(0)