Given an array, rotate the array to the right by k steps, where k is non-negative. Follow up: Try to come up as many solutions as you can, there are a ...
分类:
其他好文 时间:
2020-07-16 00:20:51
阅读次数:
49
反转字符: //反转一串字符 export default (str)=>{ let arr=str.split(' ') let result=arr.map(item=>{ return item.split('').reverse().join('') }) return result.joi ...
分类:
其他好文 时间:
2020-07-16 00:14:19
阅读次数:
58
import os # 拼接路径 print(os.path.join('a', 'b', 'c')) # 获取当前路径 print(os.getcwd()) # 在当前文件夹创建文件夹a # os.makedirs('a') # 将相对路径转为绝对路径 print(os.path.abspath( ...
分类:
其他好文 时间:
2020-07-16 00:10:05
阅读次数:
85
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int val) { ...
分类:
其他好文 时间:
2020-07-16 00:01:06
阅读次数:
61
数据表中有一列数据,如图1所示: 图1数据表 现在需要将该列数据分成三列。 SQL 代码如下所示: 1、 select max(case when F1%3=1 then F1 else 0 end) a,max(case when F1%3=2 then F1 else 0 end) b,max( ...
分类:
数据库 时间:
2020-07-15 23:51:28
阅读次数:
167
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ ...
分类:
其他好文 时间:
2020-07-15 23:40:01
阅读次数:
70
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ ...
分类:
其他好文 时间:
2020-07-15 23:31:48
阅读次数:
66
select b.name TableName,a.name TypeName,a.* from sysobjects a inner join sysobjects b on a.parent_obj=b.id and b.xtype='U' --删除约束 F外键、PK主键、D 约束、UQ 唯一约 ...
分类:
数据库 时间:
2020-07-15 23:25:41
阅读次数:
86
public boolean isBalanced(TreeNode root) { if (root == null) { return true; } int diff = getDepth(root.left) - getDepth(root.right); diff = diff > 0 ? ...
分类:
其他好文 时间:
2020-07-15 22:51:05
阅读次数:
53
@Before前置通知 在执行目标方法之前运行 @After后置通知 在目标方法运行结束之后 @AfterReturning返回通知 在目标方法正常返回值后运行 @AfterThrowing异常通知 在目标方法出现异常后运行 @Around环绕通知 在目标方法完成前/后做增强处理,环绕通知是最重要的 ...
分类:
编程语言 时间:
2020-07-15 15:56:59
阅读次数:
102