import java.util.Arrays; import java.util.EmptyStackException; public class ArrayStack { protected Object[] elementData; //数组 protected int elementCou... ...
分类:
编程语言 时间:
2018-04-30 12:00:11
阅读次数:
188
Codewars 刷题第五天,数组问题。 Enough is enough! Alice and Bob were on a holiday. Both of them took many pictures of the places they've been, and now they want ...
分类:
编程语言 时间:
2018-04-29 11:54:49
阅读次数:
196
[抄题]: You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for ...
分类:
编程语言 时间:
2018-04-29 11:37:17
阅读次数:
163
Union Two Sorted List with Distinct Value Given X = { 10, 12, 16, 20 } & Y = {12, 18, 20, 22} We would like to find out the union of two sorted arrays ...
分类:
其他好文 时间:
2018-04-29 10:12:47
阅读次数:
200
題目: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexit ...
分类:
其他好文 时间:
2018-04-29 01:28:29
阅读次数:
193
题目描述: You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for ...
分类:
其他好文 时间:
2018-04-28 20:52:19
阅读次数:
160
公司老大最近一直推崇拉姆达。自己怀着好奇心学习 Lambda在集合中的使用 列表的遍历 提起对于集合的遍历,恐怕下面的这种方式已经是一种思维定式了吧: final List<String> friends = Arrays.asList("Brian", "Nate", "Neal", "Raju" ...
分类:
数据库 时间:
2018-04-28 00:00:32
阅读次数:
271
听到初爱有感 开头啰嗦两句。刚在做算法题目的时候。听到了杨宗纬的《初爱》,突然有了一种本科时候的感觉,想想自己如今研二了,青春喂了狗,我果断喝了一罐啤酒,循环这首歌到吐….. 题目: Given two sorted integer arrays nums1 and nums2, merge num ...
分类:
其他好文 时间:
2018-04-26 01:30:57
阅读次数:
140
数组反转 正确做法 合并数组 题目 首先准备两个数组,他俩的长度是5 10之间的随机数,并使用随机数初始化这两个数组 然后准备第三个数组,第三个数组的长度是前两个的和 通过System.arraycopy 把前两个数组合并到第三个数组中 ...
分类:
编程语言 时间:
2018-04-24 21:42:26
阅读次数:
162
[抄题]: Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks one) a ...
分类:
编程语言 时间:
2018-04-23 00:12:44
阅读次数:
193