既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上Go语言开发知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
char c = third[left];
third[left] = third[right];
third[right] = c;
++left;
--right;
}
third[thirdSize] = '\0';
return third;
}
bool valid(int secondStart, int secondEnd, const char * num) {
int n = strlen(num);
int firstStart = 0, firstEnd = secondStart - 1;
while (secondEnd <= n - 1) {
char * third = stringAdd(num, firstStart, firstEnd, secondStart, secondEnd);
int thirdStart = secondEnd + 1;
int thirdEnd = secondEnd + strlen(third);
if (thirdEnd >= n || strncmp(num + thirdStart, third, thirdEnd - thirdStart + 1)) {
free(third);
break;
}
free(third);
if (thirdEnd == n - 1) {
return true;
}
firstStart = secondStart;
firstEnd = secondEnd;
secondStart = thirdStart;
secondEnd = thirdEnd;
}
return false;
}
bool isAdditiveNumber(char * num){
int n = strlen(num);
for (int secondStart = 1; secondStart < n - 1; ++secondStart) {
if (num[0] == ‘0’ && secondStart != 1) {
break;
}
for (int secondEnd = secondStart; secondEnd < n - 1; ++secondEnd) {
if (num[secondStart] == ‘0’ && secondStart != secondEnd) {
break;
}
if (valid(secondStart, secondEnd, num)) {
return true;
}
}
}
return false;
}
**C++**
class Solution {
public:
bool isAdditiveNumber(string num) {
int n = num.size();
for (int secondStart = 1; secondStart < n - 1; ++secondStart) {
if (num[0] == ‘0’ && secondStart != 1) {
break;
}
for (int secondEnd = secondStart; secondEnd < n - 1; ++secondEnd) {
if (num[secondStart] == ‘0’ && secondStart != secondEnd) {
break;
}
if (valid(secondStart, secondEnd, num)) {
return true;
}
}
}
return false;
}
bool valid(int secondStart, int secondEnd, string num) {
int n = num.size();
int firstStart = 0, firstEnd = secondStart - 1;
while (secondEnd <= n - 1) {
string third = stringAdd(num, firstStart, firstEnd, secondStart, secondEnd);
int thirdStart = secondEnd + 1;
int thirdEnd = secondEnd + third.size();
if (thirdEnd >= n || !(num.substr(thirdStart, thirdEnd - thirdStart + 1) == third)) {
break;
}
if (thirdEnd == n - 1) {
return true;
}
firstStart = secondStart;
firstEnd = secondEnd;
secondStart = thirdStart;
secondEnd = thirdEnd;
}
return false;
}
string stringAdd(string s, int firstStart, int firstEnd, int secondStart, int secondEnd) {
string third;
int carry = 0, cur = 0;
while (firstEnd >= firstStart || secondEnd >= secondStart || carry != 0) {
cur = carry;
if (firstEnd >= firstStart) {
cur += s[firstEnd] - '0';
--firstEnd;
}
if (secondEnd >= secondStart) {
cur += s[secondEnd] - '0';
--secondEnd;
}
carry = cur / 10;
cur %= 10;
third.push\_back(cur + '0');
}
reverse(third.begin(), third.end());
return third;
}
};
**java**
class Solution {
public boolean isAdditiveNumber(String num) {
int n = num.length();
for (int secondStart = 1; secondStart < n - 1; ++secondStart) {
if (num.charAt(0) == ‘0’ && secondStart != 1) {
break;
}
for (int secondEnd = secondStart; secondEnd < n - 1; ++secondEnd) {
if (num.charAt(secondStart) == ‘0’ && secondStart != secondEnd) {
break;
}
if (valid(secondStart, secondEnd, num)) {
return true;
}
}
}
return false;
}
public boolean valid(int secondStart, int secondEnd, String num) {
int n = num.length();
int firstStart = 0, firstEnd = secondStart - 1;
while (secondEnd <= n - 1) {
String third = stringAdd(num, firstStart, firstEnd, secondStart, secondEnd);
int thirdStart = secondEnd + 1;
int thirdEnd = secondEnd + third.length();
if (thirdEnd >= n || !num.substring(thirdStart, thirdEnd + 1).equals(third)) {
break;
}
if (thirdEnd == n - 1) {
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!