上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 33 下一页
摘要: 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 阅读全文
posted @ 2016-05-08 06:10 Hygeia 阅读(232) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings. 1 public class Solution { 2 3 // 1. Method 1, start from the fi 阅读全文
posted @ 2016-05-06 03:15 Hygeia 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 题目: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get 阅读全文
posted @ 2016-05-04 05:19 Hygeia 阅读(316) 评论(0) 推荐(0) 编辑
摘要: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文
posted @ 2016-05-03 05:14 Hygeia 阅读(151) 评论(0) 推荐(0) 编辑
摘要: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total num 阅读全文
posted @ 2016-02-04 05:11 Hygeia 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set must 阅读全文
posted @ 2016-02-04 04:43 Hygeia 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2016-02-03 14:44 Hygeia 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Write a program to implement your own ArrayList class. It should contain add(), get(), remove(), size() methods. Use dynamic array logic. It should in 阅读全文
posted @ 2016-01-28 01:56 Hygeia 阅读(200) 评论(0) 推荐(0) 编辑
摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
posted @ 2016-01-28 01:51 Hygeia 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 第一种形式是 publicclassSingleton{ privateSingleton(){} privatestaticfinalSingletoninstance=newSingleton(); publicstaticSingletonget... 阅读全文
posted @ 2016-01-27 13:01 Hygeia 阅读(410) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 33 下一页