摘要:
java使用贪心算法解决电台覆盖问题 代码实现 /** * 贪心算法实现集合覆盖 */ public class Demo { public static void main(String[] args) { // 创建电台和地区集合 HashMap<String, HashSet<String>> 阅读全文
posted @ 2022-04-25 10:05
CoderCatIce
阅读(68)
评论(0)
推荐(0)
摘要:
java实现字符串匹配 暴力匹配 /** * 暴力匹配 * * @param str1 需要找的总字符串 * @param str2 需要找到的字符串 * @return 找到的字符串的下标 */ private static int violence(String str1, String str 阅读全文
posted @ 2022-04-25 08:53
CoderCatIce
阅读(203)
评论(0)
推荐(0)

浙公网安备 33010602011771号