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
题意: 输入一个正整数N(<=20),接着输入N行每行包括一个正整数Z(10<=Z<=2^31),Z的数字位数保证是偶数,把Z从中间一切为二,两个整数的乘积如果是Z的因数,输出Yes,否则输出No。 trick: 当两个数乘积为0时需要特判,否则数据点2和3会出现浮点错误。 AAAAAccepted ...
分类:
其他好文 时间:
2020-06-17 12:48:33
阅读次数:
50
1. 两数之和 本题可以有两种方法,一种先排序,再用双指针法找到两数。另一种利用哈希表存储值对应的下标,如果在表中找到target-nums[i]对应的值,则直接输出 Java class Solution { public int[] twoSum(int[] nums, int target) ...
分类:
其他好文 时间:
2020-06-17 01:48:53
阅读次数:
65
比如一个简单的Person类,用常规的写法: public class Person { private String name; private String address; private Integer age; private String hobbit; private String p ...
分类:
其他好文 时间:
2020-06-16 15:38:24
阅读次数:
70
1、遍历ArrayList import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class ArrayListDemo1 { public static void main(Stri ...
分类:
编程语言 时间:
2020-06-16 15:33:39
阅读次数:
50