1.String转int Integer.parseInt(str); 2.int转String String.valueOf(int) 3.String转char[] String.toCharArray(); 4.char[]转String new String(char[]) 5.String ...
分类:
编程语言 时间:
2020-06-20 01:04:15
阅读次数:
54
在树的基本概念和术语总结一文中介绍了二叉树的基本结构。 在不知道怎样用递归?按步骤来!一文中介绍了如何使用递归。 二叉树的结构是递归的,所以创建、遍历也可以通过递归实现。 下面是一颗二叉树: 结点的定义: public class Node { Integer value; Node leftChi ...
分类:
其他好文 时间:
2020-06-19 15:53:16
阅读次数:
46
sqlalchemy是一种常用的ORM(Object-Relational Mapping对象关系映射)框架。 1 from sqlalchemy import create_engine, Column, Integer, String, DateTime, Float, Date, BLOB, ...
分类:
数据库 时间:
2020-06-19 12:24:49
阅读次数:
62
思路: 代码: @Autowired private RedisTemplate redisTemplate; @Override public void addCart(String skuId, Integer num, String username) { /** * 1)查询redis中的数 ...
分类:
其他好文 时间:
2020-06-19 00:50:05
阅读次数:
67
NumPy提供的数值类型,数值范围比Python提供的数值类型更大。NumPy的数值类型,如下表所示: SN数据类型描述 1 bool_ 布尔值,取值ture/false,占用一个字节 2 int_ 是integer的默认类型。与C语言中的long类型相同,有可能是64位或32位。 3 intc 类 ...
分类:
编程语言 时间:
2020-06-18 19:26:57
阅读次数:
64
Given the array candies and the integer extraCandies, where candies[i] represents the number of candies that the ith kid has. For each kid check if th ...
分类:
其他好文 时间:
2020-06-18 13:17:39
阅读次数:
65
2. 集合的特点: ①集合的长度是可变的②集合可以添加任意类型的对象③集合中只能存对象 3.集合框架 java.util.Collection 接口: 是集合层次的根接口 |-- java.util.List 接口:有序的,允许重复的。因为 List 系列集合都具有索引值 |--java.util. ...
分类:
编程语言 时间:
2020-06-18 13:12:15
阅读次数:
62
Given an array of integers arr and an integer k. Find the least number of unique integers after removing exactly k elements. Example 1: Input: arr = [ ...
分类:
其他好文 时间:
2020-06-18 13:10:04
阅读次数:
64
使用AtomicStampedReference解决CAS机制中ABA问题 package concurrency; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicStampedRefer ...
分类:
其他好文 时间:
2020-06-18 11:14:07
阅读次数:
72
217. 存在重复元素 Java class Solution { public boolean containsDuplicate(int[] nums) { Set<Integer> s = new HashSet<>(); for(int i = 0 ; i<nums.length ; i++ ...
分类:
其他好文 时间:
2020-06-18 01:25:19
阅读次数:
44