Given an integer array of sizen, find all elements that appear more than? n/3 ?times. The algorithm should run in linear time and in O(1) space.Hint:H...
分类:
其他好文 时间:
2015-07-23 13:41:41
阅读次数:
103
1 public class FindKthSorted { 2 //Method 1: time complexity O(k), no extra space 3 4 public int findKth (int[] a, int[] b, int k) { 5 ...
分类:
其他好文 时间:
2015-07-23 08:14:21
阅读次数:
121
G - Asteroids!
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
You're in space.
You want to get home.
There are asteroids.
...
分类:
其他好文 时间:
2015-07-22 20:53:11
阅读次数:
108
word-wrap:break-word;截断数字或者单词,换行显示;white-space:nowrap;强制不换行;word-break:break-all;强制英文单词换行;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
分类:
其他好文 时间:
2015-07-22 17:51:26
阅读次数:
79
leetcode -Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?/** * Definitio...
分类:
其他好文 时间:
2015-07-22 12:14:17
阅读次数:
114
Determine whether an integer is a palindrome. Do this without extra space.class Solution {public: bool isPalindrome(int x) { if(x = 1){ ...
分类:
其他好文 时间:
2015-07-22 06:46:22
阅读次数:
144
Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:You may assume thatnums1has enough space (size that is great...
分类:
其他好文 时间:
2015-07-21 20:11:42
阅读次数:
126
PermGen space:全称是Permanent Generation space。就是说是永久保存的区域,用于存放Class和Meta信息,Class在被Load的时候被放入该区域 Heap space:存放Instance。 GC(Garbage Collection)应该不会对PermGen s...
分类:
系统相关 时间:
2015-07-21 17:31:04
阅读次数:
220
ALTER DATABASE DATAFILE 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF' resize 4096M; SELECT USED.TABLESPACE_NAME, USED.USED_BYTES...
分类:
数据库 时间:
2015-07-21 16:39:01
阅读次数:
264