单链表创建链表出现问题,一开始以为是length函数有错,但是排查不出来,经过博客问答,知到了问题的根本原因,随便还改正了代码混乱的毛病 博问链接: https://q.cnblogs.com/q/134034/ 错误代码: #include<stdio.h> #include<stdlib.h> ...
分类:
其他好文 时间:
2021-04-06 14:23:01
阅读次数:
0
给你一个数组 nums ,数组中只包含非负整数。定义 rev(x) 的值为将整数 x 各个数字位反转得到的结果。比方说 rev(123) = 321 , rev(120) = 21 。我们称满足下面条件的下标对 (i, j) 是 好的 : 0 <= i < j < nums.length nums[ ...
分类:
编程语言 时间:
2021-04-06 14:22:24
阅读次数:
0
在项目的根目录下放置.gitlab-ci.yml文件来达到持续集成和部署的目的。 .gitlab-ci.yml被runner进程读取,从而完成CI/CD的任务。默认情况下有三个阶段的流水线阶段:build、test、deploy。 简而言之,具体的CI所需要的步骤就两步: 添加.gitlab-ci. ...
分类:
其他好文 时间:
2021-04-06 14:19:41
阅读次数:
0
仅供自己学习 思路: 直接遍历判断即可 class Solution { public: int calculate(string s) { int n=s.length(); int x=1,y=0; for(int i=0;i<n;++i){ if(s[i]=='A') x = 2*x+y; e ...
分类:
其他好文 时间:
2021-04-06 14:14:23
阅读次数:
0
█ 0.代码函数: ○ 0.1 边界 Integer.MAX_VALUE int[] preorder ==> preorder == null || preorder.length == 0 char[][] board ==> board == null int[][] matrix ==> ( ...
分类:
其他好文 时间:
2021-04-06 14:10:55
阅读次数:
0
31. 下一个排列 LeetCode_31 题目描述 题解分析 代码实现 class Solution { public void nextPermutation(int[] nums) { int i = nums.length - 2; while(i >= 0 && nums[i] >= nu ...
分类:
其他好文 时间:
2021-04-06 14:03:32
阅读次数:
0
s = set('hello,word') print(s) #set 方法 s = {'xiaoming', 'xiaoming', 'xiaoming1'} print(s) s.add('s') # 添加元素 s.clear(s) # 清空集合 s1 = s.copy(s) # 复制集合 s. ...
分类:
编程语言 时间:
2021-04-05 12:51:32
阅读次数:
0
Description: Given a string s and a string array dictionary, return the longest string in the dictionary that can be formed by deleting some of the gi ...
分类:
其他好文 时间:
2021-04-05 12:21:20
阅读次数:
0
柯里化(Currying)是把接受多个参数的函数变换成接受一个单一参数(最初函数的第一个参数)的函数,并且返回接受余下的参数且返回结果的新函数的技术。 通过一个例子再解释理解一下 // 普通的add函数 function add(x, y) { return x + y } // Currying后 ...
分类:
其他好文 时间:
2021-04-05 12:20:34
阅读次数:
0
//字符串转数组 - (id)toArrayOrNSDictionary:(NSString *)jsonData{ if (jsonData != nil) { NSData* data = [jsonData dataUsingEncoding:NSUTF8StringEncoding]; id ...
分类:
移动开发 时间:
2021-04-05 11:49:10
阅读次数:
0