- 博客(30)
- 资源 (9)
- 收藏
- 关注
转载 LeetCode – Triangle (Java)
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2], [3,4], [6,
2014-04-29 14:05:11 843
转载 String is passed by “reference” in Java
This is a classic question of Java. Many similar questions have been asked on stackoverflow, and there are a lot of incorrect/incomplete answers. The question is simple if you don’t think too much. Bu
2014-04-29 14:03:00 853
转载 LeetCode – Rotate Image (Java)
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? Naive Solution In the following solution, a new
2014-04-29 12:51:27 592
转载 LeetCode – Search a 2D Matrix (Java)
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has properties: 1) Integers in each row are sorted from left to right. 2) The first integer of each row is gre
2014-04-29 12:42:00 464
转载 LeetCode – Spiral Matrix (Java)
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, given the following matrix: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ] Y
2014-04-29 09:50:45 521
转载 FLAG_ACTIVITY_CLEAR_TOP和FLAG_ACTIVITY_REORDER_TO_FRONT用法
FLAG_ACTIVITY_CLEAR_TOP和FLAG_ACTIVITY_REORDER_TO_FRONT用法 (2013-03-18 11:13:02) 转载▼ 标签: it 分类: android应用技巧 Activity的两种启动模式: FLAG_ACTIVITY_CLEAR_TOP和FLAG_ACTIVI
2014-04-28 16:26:12 593
转载 LeetCode – Valid Palindrome (Java)
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, “A man, a plan, a canal: Panama” is a palindrome. “race a car” is not a
2014-04-28 13:46:05 807
转载 Android 画图方式总结
Android apk 里面的画图分为2D和3D两种:2D是由Skia 来实现的,也就是我们在框架图上看到的SGL,SGL也会调用部分opengl 的内容来实现简单的3D效果;3D部分是由OpenGL|ES实现的 先了解一下Android apk的几种画图方式,然后再来来看一看这一整套的图形体系是怎么建立的 画图都是对供给应用程序的一块内存进行数据填充,也就是对这块surface内存进
2014-04-28 13:09:39 614
转载 LeetCode – Longest Consecutive Sequence Java
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is [1, 2, 3
2014-04-28 08:29:26 597
转载 Java程序挂掉的几种可能
今天花了一整天在跟踪一个问题,每次感觉已经快找到原因的时候发现现象又变了,我觉得从中吸取的教训可以给大家分享一下。 为了重现这个现象,我写了一个简单的例子。在本例中,先初始化了一个map,然后用一个无限循环将一些键值对插入到map里面: class Wrapper { public static void main(String args[]) throws Excepti
2014-04-28 08:12:53 10410 1
转载 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 duplicates in the array.
2014-04-25 15:22:21 706
转载 LeetCode – Set Matrix Zeroes (Java)
Thoughts about This Problem This problem can solve by following 4 steps: check if first row and column are zero or notmark zeros on first row and columnuse mark to set elementsset first column a
2014-04-25 15:05:52 729
转载 LeetCode – Implement strStr() (Java)
Problem: Implement strStr(). Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack. Thoughts First, need to understand the problem
2014-04-25 14:52:52 661
转载 LeetCode – Valid Parentheses (Java)
Problem: Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[' and ']‘, determine if the input string is valid. The brackets must close in the correct order, “()” and “()[]{}”
2014-04-24 15:49:09 657
转载 LeetCode – Merge Sorted Array (Java)
Problem: Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space to hold additional elements from B. The number of elements
2014-04-24 15:33:20 634
转载 LeetCode – String to Integer (atoi) (Java)
Problem: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possi
2014-04-24 13:39:50 507
转载 LeetCode – 3Sum Closest (Java)
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly
2014-04-24 13:30:19 639
转载 LeetCode – 4Sum (Java)
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: Elements in a
2014-04-24 13:10:19 487
转载 LeetCode – 3Sum
Problem: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: Elements in a trip
2014-04-23 14:36:57 511
转载 LeetCode – Two Sum (Java)
Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, w
2014-04-23 13:25:38 599
转载 LeetCode – Insert Interval
Problem: Given a set of non-overlapping & sorted intervals, insert a new interval into the intervals (merge if necessary). Example 1: Given intervals [1,3],[6,9], insert and merge [2,5] in as
2014-04-23 11:47:42 500
转载 Android操作HTTP实现与服务器通信
本示例以Servlet为例,演示Android与Servlet的通信。 众所周知,Android与服务器通信通常采用HTTP通信方式和Socket通信方式,而HTTP通信方式又分get和post两种方式。至于Socket通信会在以后的博文中介绍。 HTTP协议简介: HTTP (Hypertext Transfer Protocol ),是Web联网的基础,也是手机联网
2014-04-21 13:51:21 695
转载 LeetCode – Regular Expression Matching in Java
Problem: Implement regular expression matching with support for ‘.’ and ‘*’. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the
2014-04-18 16:57:28 867
转载 LeetCode – Median of Two Sorted Arrays Java
LeetCode Problem: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). Keys to
2014-04-18 11:48:40 522
转载 Leetcode Solution – Word Break
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s = “leetcode”, dict = ["leet"
2014-04-15 08:42:54 620
转载 Leetcode Solution of Longest Palindromic Substring in Java
By X Wang Finding the longest palindromic substring is a classic problem of coding interview. In this post, I will summarize 3 different solutions for this problem. 1. Naive Approach Naiv
2014-04-14 17:22:07 548
转载 10个精妙的Java编码最佳实践
本文由 ImportNew - liken 翻译自 jooq。欢迎加入Java小组。转载请参见文章末尾的要求。 这是一个比Josh Bloch的Effective Java规则更精妙的10条Java编码实践的列表。和Josh Bloch的列表容易学习并且关注日常情况相比,这个列表将包含涉及API/SPI设计中不常见的情况,可能有很大影响。 我在编写和维护jOOQ(Java中内部DS
2014-04-01 22:28:52 675
图灵程序设计丛书 - 鲜活的数据数据可视化指南
2019-04-27
redis设计与实现_扫描版_完整版
2016-01-28
大数据文摘.03
2016-01-28
高盛虚拟现实报告2016
2016-01-19
大数据文摘
2016-01-18
朱飞达-BDTC_2015_大数据与金融创新:从研究到实战
2016-01-06
大数据文摘 vol.01
2016-01-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人