一、实现Android国际化,分为两步:1、在工程的res目录下创建不同国家和语种的资源目录(values或drawable),系统会根据设备当前的语言环境自动选择相应的资源文件。2、翻译各国语言的文字,放入不同国家和语句的资源目录,即strings.xml或arrays.xml。二、工具实现原理介...
分类:
移动开发 时间:
2015-04-13 14:16:20
阅读次数:
237
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 (size that is greater or equal to m +
n) to hold additional elements from B...
分类:
其他好文 时间:
2015-04-13 12:55:54
阅读次数:
127
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 (size that is greater or equal...
分类:
其他好文 时间:
2015-04-12 22:30:06
阅读次数:
155
Arrays STL各种实现代码。 《C++标准程序库》 1 /* 2 2015.4 3 an STL container (as wrapper) for arrays of constant size. 4 5 */ 6 7 #pragma warning(disable :...
分类:
其他好文 时间:
2015-04-12 20:54:19
阅读次数:
157
B树: 二叉查找树,所有左节点都比父节点要小,所有右节点都比父节点要大。查找,插入的时间复杂度为O(logn)public class BTreeTest { public static int[] arrays = {1,7,5,12,8,4}; private static No...
分类:
其他好文 时间:
2015-04-12 20:36:33
阅读次数:
105
题目如下:
Given numRows, generate the first numRows of Pascal's triangle.
For example, given numRows = 5,
Return
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,1]
]
我的代码:...
分类:
编程语言 时间:
2015-04-12 16:16:46
阅读次数:
105
int[] a=new int[3]; int[] b=new int[3]; int[] c = new int[a.length+b.length]; c = Arrays.copyOf(a, c.length); /*arg0 - 源数组。 ...
分类:
编程语言 时间:
2015-04-12 14:41:11
阅读次数:
154
题目地址:https://leetcode.com/problems/median-of-two-sorted-arrays/题目解析:看到题目的第一个思路是用二分查找,但是深入下去后发现使用二分查找很多边界和细节方面的处理很麻烦,退而求其次,采用分治法。如果两个数组的长度和为偶数,则求两个数组的中...
分类:
其他好文 时间:
2015-04-12 14:37:18
阅读次数:
97
题目链接:maximal-rectangle
import java.util.Arrays;
/**
* Given a 2D binary matrix filled with 0's and 1's,
* find the largest rectangle containing all ones and return its area.
*
*/
public cl...
分类:
其他好文 时间:
2015-04-12 13:28:40
阅读次数:
189
Description: 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 (siz...
分类:
其他好文 时间:
2015-04-11 23:50:26
阅读次数:
137