算法
文章平均质量分 60
samfang
这个作者很懒,什么都没留下…
展开
-
Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, whe原创 2013-08-06 10:41:56 · 567 阅读 · 0 评论 -
Median of Two Sorted Arrays (全数组扫描)
public class Solution { public double findMedianSortedArrays(int A[], int B[]) { // Start typing your Java solution below // DO NOT write main() function int alengt原创 2013-08-08 09:02:08 · 614 阅读 · 0 评论 -
median-of-two-sorted-arrays
http://leetcode.com/2011/03/median-of-two-sorted-arrays.html#comment-1053public class Solution { public double findMedianSortedArrays(int A[], int B[]) { // Start typing your Jav原创 2013-08-07 11:50:10 · 643 阅读 · 0 评论 -
Palindrome Partitioning
import java.util.*;public class Solution { public ArrayList> partition(String s) { // Start typing your Java solution below // DO NOT write main() function ArrayL原创 2013-08-08 10:15:19 · 531 阅读 · 0 评论 -
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link原创 2013-08-09 09:33:47 · 563 阅读 · 0 评论 -
Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo原创 2013-08-09 06:44:31 · 541 阅读 · 0 评论 -
Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321Have you thought about this?Here are some good questions to ask before coding. Bonus points for you原创 2013-08-09 21:26:21 · 572 阅读 · 0 评论 -
Longest Palindromic Substring (DP)
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.public class S原创 2013-08-12 11:03:19 · 744 阅读 · 0 评论