周赛地址(英):Weekly Contest 194 周赛地址(中):第 194 场周赛 仓库地址:week-Leetcode 1486. XOR Operation in an Array Given an integer n and an integer start. Define an arr ...
分类:
其他好文 时间:
2020-06-21 19:54:59
阅读次数:
61
#大话设计模式——简单工厂模式 --参考自《大话设计模式》 需求 现在有一个需求,实现一个简单的计算器 对于一般的初学者来说可能会这么实现: public class calculate { public static void main(String[] args) { Scanner cin = ...
分类:
其他好文 时间:
2020-06-21 19:41:43
阅读次数:
40
1.Integer Inquiry 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1047 解法:一道求大数之和,我们利用java里的BigInteger就可以轻松的解决,不过需要注意下格式的问题,每输出一个就要空一行,最后一个不用 代码: impor ...
分类:
其他好文 时间:
2020-06-21 18:09:00
阅读次数:
62
public int[] pondSizes(int[][] land) { List<Integer> list = new ArrayList<>(); int temp; for (int i = 0; i < land.length; i++) { for (int j = 0; j < l ...
分类:
其他好文 时间:
2020-06-21 12:04:47
阅读次数:
127
The set [1,2,3,...,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the following seque ...
分类:
其他好文 时间:
2020-06-21 10:13:55
阅读次数:
48
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating ...
分类:
其他好文 时间:
2020-06-21 10:09:51
阅读次数:
35
Perfect Squares (M) 题目 Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. Exa ...
分类:
其他好文 时间:
2020-06-21 09:19:56
阅读次数:
46
4Sum (M) 题目 Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b+ c + d = target? Find a ...
分类:
其他好文 时间:
2020-06-21 09:18:37
阅读次数:
40
第十九天LeetCode刷题-算法 第十九天习题——字符串转换整数的函数 此题仅为个人总结参考,如有错误还请指出 首先先上原题: 来源:力扣(LeetCode)原题链接:https://leetcode-cn.com/problems/string-to-integer-atoi/拿到这道题,会发现 ...
分类:
编程语言 时间:
2020-06-20 01:30:59
阅读次数:
74
###题目描述 输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否可能为该栈的弹出顺序。假设压入栈的所有数字均不相等。例如序列1,2,3,4,5是某栈的压入顺序,序列4,5,3,2,1是该压栈序列对应的一个弹出序列,但4,3,5,1,2就不可能是该压栈序列的弹出序列。(注意:这两个序 ...
分类:
其他好文 时间:
2020-06-20 01:28:17
阅读次数:
60