Spring Boot2.0不容错过的新特性 WebFlux响应式编程

String 立即前往 = " http://icourse8.com/webfluxxys.html ";

详细信息

第1章 课程介绍   

第2章 函数式编程和lambda表达式   

第3章 Stream流编程   

第4章 reactive stream 响应式流   

第5章 webflux服务端开发讲解   

第6章 webflux客户端声明式restclient框架开发讲解   

class Solution {
    public String longestCommonPrefix(String[] strs) {
     if (strs.length == 1){
            return strs[0];
        }
        StringBuilder sb = new StringBuilder();
        if (strs.length>1) {
            int len = strs[0].length();
            for (int i = 0; i < len; i++) {
                char curr = strs[0].charAt(i);
                for (int j = 1; j < strs.length; j++) {
                    if (strs[j].length()<=i ||strs[j].charAt(i) != curr) {
                        return sb.toString();
                    }
                    if (strs[j].charAt(i) == curr && j == strs.length - 1) {
                        sb.append(curr);
                    }
                }
            }
        }
       return sb.toString();
    }
}

猜你喜欢

转载自www.cnblogs.com/zhaunkejiyi/p/11095118.html