- 博客(24)
- 资源 (5)
- 收藏
- 关注
原创 Leetcode-merge-two-sorted-lists
题目描述Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.将两个链表连起来。 * public class List
2016-06-30 17:20:03 415
原创 Leetcode-best-time-to-buy-and-sell-stock
题目描述Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one shar
2016-06-30 16:31:05 270
原创 Leetcode-balanced-binary-tree
题目描述Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every
2016-06-30 16:00:09 198
原创 Leetcode-remove-duplicates-from-sorted-list
题目描述Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given1->1->2, return1->2.Given1->1->2->3->3, return1->2->3.题目理解起来也不难,删
2016-06-30 14:13:22 242
原创 Leetcode-maximum-subarray
题目描述Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[−2,1,−3,4,−1,2,1,−5,4],the contiguous subarra
2016-06-30 13:27:32 181
原创 Leetcode-binary-tree-preorder-traversal
题目描述Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Note: Re
2016-06-30 11:56:11 195
原创 Leetcode-binary-tree-inorder-traversal
题目描述Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note: Rec
2016-06-30 11:52:36 365
原创 Leetcode-count-and-say
题目描述 Thecount-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is readoff as"one 1"or11.11is read off as"two 1s"or21.21is read off as"one 2, t
2016-06-30 09:36:43 210
原创 Leetcode-unique-paths
题目描述 A robotis located at the top-left corner of a m x n grid (marked 'Start' in the diagrambelow).The robotcan only move either down or right at any point in time. The robot is trying toreach t
2016-06-30 09:36:17 193
原创 Leetcode-roman-to-integer
题目描述 Given a roman numeral,convert it to an integer.Input is guaranteed to be within the rangefrom 1 to 3999.关于罗马数与阿拉伯数转化的问题,前面的博文中我们做了阿拉伯数转罗马数的方法,这里是求罗马数转阿拉伯数的方法。只需要注意两点即可:1、大数在前,小数在后,如VI
2016-06-30 09:35:51 195
原创 Leetcode-unique-binary-search-trees
题目描述Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's.1 3 3
2016-06-29 14:01:46 156
转载 GitHub上优秀开源项目
这里只给出网址:https://github.com/Trinea/android-open-project需要多多研究。
2016-06-29 11:08:09 268
转载 GitHub 优秀的 Android 开源项目
看到一篇好到不要不要得android开源项目总结,转载过来,以备不时之需。转载自:http://blog.csdn.net/finddreams/article/details/40923109 在此请接受我的感谢!对于GitHub上开源项目的整理,很多博客都有写过。但是我觉得有些博客整理的开源项目过多,让我们看的眼花缭乱,以至于我们不知道该用哪一个好。所以为了更好的有利
2016-06-29 10:42:52 591
原创 Leetcode-search-insert-position
题目描述Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicat
2016-06-27 17:45:57 191
原创 Leetcode-container-with-most-water
题目描述Given n non-negative integers a1,a2, ..., an, where each represents a point at coordinate (i,ai). n vertical lines are drawn such that the two endpoints of linei is at (i, ai) an
2016-06-27 16:39:47 167
原创 Leetcode-climbing-stairs
题目描述You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?public class
2016-06-27 15:59:36 228
原创 Leetcode-rotate-image
题目描述You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?还是老问题,这种题目本身不难,但是加了限制条件就变难了,只能在当前空间
2016-06-26 19:59:42 142
原创 Leetcode-integer-to-roman
题目描述Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.拿到这个题目,不清楚罗马数字是个什么玩意,百度了许久,知道了这个数字的一些规则:罗马数字共有7个,即I(1)、V(5)、X(
2016-06-26 17:00:27 266
原创 Leetcode-palindrome-number
题目描述Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)If you are thi
2016-06-26 16:36:30 175
原创 Leetcode-linked-list-cycle
题目描述Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?寻找链表中的环,用两个指针,一个一次走一步,另一个一次走两步,如果相遇则存在环,反之则不存在。public class
2016-06-26 16:33:43 148
原创 Leetcode-best-time-to-buy-and-sell-stock-ii
题目描述Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you
2016-06-26 16:31:55 200
原创 Leetcode-reverse-integer
题目描述Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good questions to as
2016-06-26 16:29:56 161
原创 Leetcode-maximum-depth-of-binary-tree
题目描述Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.public class
2016-06-26 16:27:08 256
原创 Android缓存
最新在学习android缓存的内容,现在就列出几个网址,非常非常有用!https://github.com/Trinea/android-commonhttp://www.codeceo.com/article/asimplecache-android-cache.htmlhttp://www.jb51.net/article/38162.htm感谢上述大神的分享,分享
2016-06-22 11:47:35 173
Android 暗黑模式,dark mode,demo源码
2020-04-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人