Given an array of integers, every element
appears twice except for one. Find that single one.Note: Your algorithm should
have a linear runtime complex...
分类:
其他好文 时间:
2014-06-10 21:27:22
阅读次数:
284
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...
分类:
其他好文 时间:
2014-06-10 20:44:02
阅读次数:
298
Given an array of integers, every element
appears three times except for one. Find that single one.Note: Your algorithm
should have a linear runtime c...
分类:
其他好文 时间:
2014-06-10 20:42:48
阅读次数:
315
1 class Solution { 2 public: 3 int
singleNumber(int A[], int n) { 4 int bits = sizeof(int)*8; 5 int result=0; 6
for(int i...
分类:
移动开发 时间:
2014-06-10 19:45:48
阅读次数:
334
1、几个术语
VGA、HVGA、QVGA、WVGA、WQVGA
这些术语都是指屏幕的分辨率。
VGA:Video Graphics Array,即:显示绘图矩阵,相当于640×480 像素;
HVGA:Half-size VGA;即:VGA的一半,分辨率为480×320;
QVGA:Quarter VGA;即:VGA的四分之一,分辨率为320×240;
WVGA:Wide Video ...
分类:
移动开发 时间:
2014-06-10 19:16:28
阅读次数:
314
题目
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying t...
分类:
其他好文 时间:
2014-06-10 18:43:37
阅读次数:
254
题目
Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space is marked as 1 and 0 respective...
分类:
其他好文 时间:
2014-06-10 18:28:49
阅读次数:
207
1,数组基本操作 //插入元素,替换插入后第一个元素 var aa = [1,2,3,4]
aa[1...1] = [6,7,8] println("\(aa)") //插入元素,不替换插入后第一个元素 aa = [1,2,3,4] ...
分类:
其他好文 时间:
2014-06-10 17:08:13
阅读次数:
182
原题地址:https://oj.leetcode.com/problems/longest-common-prefix/题意:Write
a function to find the longest common prefix string amongst an array of
strings.解...
分类:
编程语言 时间:
2014-06-10 16:31:52
阅读次数:
261
3.1Describe how you could use a single array to
implement three stacks.Flexible
Divisions的方案,当某个栈满了之后,需要把相邻的栈调整好,这是一个递归的过程。每个stack有一些属性,所以不妨将每个stack封闭...
分类:
其他好文 时间:
2014-06-10 16:27:38
阅读次数:
234