Single Number 题目 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a line ...
分类:
其他好文 时间:
2016-04-03 13:09:21
阅读次数:
211
题目描写叙述: Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn’t one ...
分类:
其他好文 时间:
2016-04-03 10:08:41
阅读次数:
132
并查集(Union-find Sets)是一种非常精巧而实用的数据结构,它主要用于处理一些不相交集合的合并问题。一些常见的用途有求连通子图、求最小生成树的 Kruskal 算法和求最近公共祖先(Least Common Ancestors, LCA)等。 使用并查集时,首先会存在一组不相交的动态集合 ...
分类:
其他好文 时间:
2016-04-02 18:53:32
阅读次数:
166
【转】Ubuntu 上编译Android出现cannot find -lstdc++解决办法 在Ubuntu 12.04 x86_64机器上编译Android出现下面错误,是因为找不到32bit的libstdc++.so库。 /usr/bin/ld: skipping incompatible /u ...
分类:
移动开发 时间:
2016-04-02 16:08:18
阅读次数:
360
题目: Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums ...
分类:
其他好文 时间:
2016-04-02 14:52:13
阅读次数:
134
Given an array of integers, find two non-overlapping subarrays which have the largest sum. The number in each subarray should be contiguous. Return th ...
分类:
其他好文 时间:
2016-04-02 12:07:58
阅读次数:
174
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 whic ...
分类:
其他好文 时间:
2016-04-02 10:49:40
阅读次数:
132
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 ...
分类:
其他好文 时间:
2016-04-02 09:33:39
阅读次数:
152
Given an array of size n, find the majority element. The majority element is the element that appears more than ? n/2 ? times. You may assume that the ...
分类:
其他好文 时间:
2016-04-02 09:32:35
阅读次数:
130