Chinaunix首页 | 论坛 | 博客
  • 博客访问: 270034
  • 博文数量: 170
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1709
  • 用 户 组: 普通用户
  • 注册时间: 2014-05-06 18:01
文章分类

全部博文(170)

文章存档

2016年(11)

2015年(130)

2014年(29)

发布时间:2015-03-28 11:53:11

//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. For "bbbbb" the longest substring is "b", with the length of 1.注意:使用数组保存前面的没有出现的字.........【阅读全文】

阅读(1535) | 评论(0) | 转发(0)

发布时间:2015-03-27 20:35:48

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 linked list.Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)Output: 7 -> 0 -> 8 public Lis.........【阅读全文】

阅读(475) | 评论(0) | 转发(0)

发布时间:2015-03-27 10:57:33

//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, where index1 must be less than index2. Please note that your returned answers (both index1 and inde.........【阅读全文】

阅读(423) | 评论(0) | 转发(0)

发布时间:2015-03-26 18:33:01

Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.set(key, value) - Set o.........【阅读全文】

阅读(420) | 评论(0) | 转发(0)

发布时间:2015-03-22 17:08:30

import java.util.ArrayList;import java.util.HashSet;import java.util.Set;//Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.////For example, given//s = "leetcode",//.........【阅读全文】

阅读(307) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册