Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Inpu ...
分类:
其他好文 时间:
2020-04-06 11:37:02
阅读次数:
81
Given 2 lists a and b. Each element is a pair of integers where the first integer represents the unique id and the second integer represents a value. ...
分类:
其他好文 时间:
2020-04-06 10:06:59
阅读次数:
72
Problem : Given an integer, write a function to determine if it is a power of two. Example 1: Example 2: Example 3: `` Input: 218 Output: false c bool ...
分类:
其他好文 时间:
2020-04-06 00:03:04
阅读次数:
83
八种基本数据类型对应八种包装类和它们的继承关系 基本数据类型对应的包装类 boolean Boolean byte Byte short Short int Integer long Long char Character float Float double Double 1. 包装类的共性: 多 ...
分类:
编程语言 时间:
2020-04-05 22:08:47
阅读次数:
91
在VBA中如何使用excel中的函数 这样Application.WorksheetFunction. “.”后面就能找到在excel中常用的函数 代码 Sub tongji() Dim k, l, m As Integer For i = 2 To Sheets.Count k = k + App ...
分类:
编程语言 时间:
2020-04-05 18:37:55
阅读次数:
102
1、使用reverse函数 #include <algorithm> //添加头文件 reverse(s.begin(), s.end()); //具体用法 (s是一个string) ...
分类:
编程语言 时间:
2020-04-05 18:26:30
阅读次数:
63
当多线程访问共享可变数据时,涉及到线程间同步的问题,并不是所有时候,都要用到共享数据,所以就需要线程封闭出场了。 数据都被封闭在各自的线程之中,就不需要同步,这种通过将数据封闭在线程中而避免使用同步的技术称为 线程封闭 。 本文主要介绍线程封闭中的其中一种体现:ThreadLocal,将会介绍什么是 ...
分类:
其他好文 时间:
2020-04-05 18:11:56
阅读次数:
57
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1062 题目描述: 伊格纳修斯喜欢用相反的方式写词。给定由Ignatius编写的单行文本,您应该反转所有单词,然后输出它们。 输入值 输入包含几个测试用例。输入的第一行是单个整数T,它是测试用例的数量。随 ...
分类:
其他好文 时间:
2020-04-05 16:59:34
阅读次数:
90
自己对照API文档,学习Integer类,如有错误,请指正最大值Integer.MAX_VALUE最小值Integer.MIN_VALUE类原始类型int的类实例:intInteger.TYPE用于表示二进制补码二进制形式的int值的位数:32Integer.SIZE用于表示二进制补码二进制形式的int值的字节数:4Integer.BYTESInteger类类型:classjava.lang.In
分类:
其他好文 时间:
2020-04-05 15:17:58
阅读次数:
66
1、反转链表 "力扣地址" 实现方法一:三指针遍历,pre+cur+next;时间复杂度O(n),空间复杂度O(1)。 实现方法二:递归解法,1+ (reverse(2,3));时间复杂度O(n),空间复杂度O(n)(递归调用要占用系统栈空间)。 2、删除链表的节点 "力扣地址" 解法:增加dumm ...
分类:
编程语言 时间:
2020-04-05 13:47:46
阅读次数:
84