JAVA
文章平均质量分 86
只只只只只只
这个作者很懒,什么都没留下…
展开
-
JAVA_性能随笔
在刷Leetcode的时候,遇到了一题数据结构相关的题目(反复往栈中装填数据)。提交的时候顺便看看各个语言的速度:C++和C一骑绝尘而去。之前测试在计算为主的任务中,JAVA的性能与C/C++不相上下~‘’‘随手一记,来日填坑‘’’原创 2016-11-05 20:48:09 · 167 阅读 · 0 评论 -
罗马和阿拉伯数字相互转换
之前做#1566 hihocoder 题目遇到了这个基本的问题,卡了一会儿,这里补齐这个问题。参考:http://blog.sina.com.cn/s/blog_7025794a0101397g.htmlhttp://blog.csdn.net/fightforyourdream/article/details/12934139思路:r2a:原创 2017-09-06 10:10:06 · 681 阅读 · 0 评论 -
【Leetcode】287. Find the Duplicate Number
287. Find the Duplicate NumberGiven an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that th原创 2017-02-26 11:27:13 · 300 阅读 · 0 评论 -
【Leetcode】106. Construct Binary Tree from Inorder and Postorder Traversal
106. Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist原创 2017-03-01 22:43:20 · 188 阅读 · 0 评论 -
【Leetcode】216. Combination Sum III
216. Combination Sum IIIFind all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of nu原创 2017-02-27 22:26:41 · 177 阅读 · 0 评论 -
【Leetcode】454. 4Sum II
问题:454. 4Sum IIGiven four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero.To make problem a bit easier, a原创 2017-01-12 20:36:06 · 196 阅读 · 0 评论 -
JAVA_Enumeration
'''我是python注释君、'''(文章转载自:易百教程 [http:/www.yiibai.com])Enumeration接口定义,通过它可以枚举(获得一次一个)对象集合的元素的方法。这个原有的接口已经被迭代器取代。虽然未过时,枚举被认为是过时的新代码。然而,他是用来通过由旧版的类,如向量和属性定义了几种方法,所使用的其他几个API类,而且目前在应用程序代码中广泛转载 2016-10-26 22:20:56 · 207 阅读 · 0 评论 -
JAVA_Dictionary类
'''我是Python注释君、'''(文章转载自:易百教程 [http:/www.yiibai.com])一。Dictionary字典是代表一个键/值存储库。给定一个键和值,可以在一个Dictionary对象存储的值。一旦该值被存储,可以使用它的键检索。因此,像一个映射,词典可以被认为是作为键/值对的列表。通过字典中定义的抽象方法如下:转载 2016-10-26 22:06:36 · 3601 阅读 · 0 评论 -
JAVA_String_StringBuffer_StringBuilder
JAVA笔记转载 2016-10-26 21:38:02 · 145 阅读 · 0 评论 -
Offer收割赛25 #1567 偶树分割
Offer收割赛25 #1567描述如果一棵树节点数目是偶数,那么就称这棵树是偶树。给定一棵N个节点的偶树(编号1~N),小Hi想知道他最多可以同时切断多少条边,使得剩下的森林中每一个联通分量都是一棵偶树。例如如下的偶树: 1 / | | \ 2 3 4 5 | 6可以切断原创 2017-09-07 10:33:16 · 215 阅读 · 0 评论