logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

LeetCode66-加一

1.思路:主要考虑进位,如果当前元素不为9,加1直接返回,如果为9,则要进位给前一元素。如果元素都为9,则返回新的数组[length+ 1],newArray[0] = 1;2.代码:class Solution {public int[] plusOne(int[] digits) {int len = digits.length;for (int i = len - 1; i >= 0

#算法#leetcode#数据结构
springboot报错:class path resource cannot be opened because it does not exits

问题描述:springboot报错:在使用@PropertySource注解读取properties文件时,报错:class path resource cannot be opened because it does not exits。问题原因:发现prpperties不是绿色的小叶子。解决方法:1. 先将resources目录标记为resources目录。2.然后添加properties文件

#java#spring#maven +1
暂无文章信息