摘要:
Given an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements t... 阅读全文
posted @ 2015-10-10 12:39
茜茜的技术空间
阅读(120)
评论(0)
推荐(0)
摘要:
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity... 阅读全文
posted @ 2015-10-10 11:41
茜茜的技术空间
阅读(146)
评论(0)
推荐(0)
摘要:
Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.解题思路:解题想法是,从haystack的第一个位置... 阅读全文
posted @ 2015-10-10 11:01
茜茜的技术空间
阅读(219)
评论(0)
推荐(0)
摘要:
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw... 阅读全文
posted @ 2015-10-10 09:10
茜茜的技术空间
阅读(162)
评论(0)
推荐(0)
摘要:
There is a fence with n posts, each post can be painted with one of the k colors.You have to paint all the posts such that no more than two adjacent f... 阅读全文
posted @ 2015-10-10 08:27
茜茜的技术空间
阅读(248)
评论(0)
推荐(0)
摘要:
Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of a ... 阅读全文
posted @ 2015-10-10 07:58
茜茜的技术空间
阅读(162)
评论(0)
推荐(0)
摘要:
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes... 阅读全文
posted @ 2015-10-10 03:09
茜茜的技术空间
阅读(128)
评论(0)
推荐(0)
摘要:
Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with ... 阅读全文
posted @ 2015-10-10 02:30
茜茜的技术空间
阅读(237)
评论(0)
推荐(0)
摘要:
Design and implement a TwoSum class. It should support the following operations:addandfind.add- Add the number to an internal data structure.find- Fin... 阅读全文
posted @ 2015-10-10 01:29
茜茜的技术空间
阅读(289)
评论(0)
推荐(0)
摘要:
The API:int read4(char *buf)reads 4 characters at a time from a file.The return value is the actual number of characters read. For example, it returns... 阅读全文
posted @ 2015-10-10 01:04
茜茜的技术空间
阅读(1146)
评论(0)
推荐(0)

浙公网安备 33010602011771号