- 博客(16)
- 收藏
- 关注
原创 Single Number
Given an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra me
2015-04-29 18:47:53 236
原创 Remove Nth Node From End of List
Given a linked list, remove the nth node from the end of list and return its head.
2015-04-29 10:18:53 291
原创 Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
2015-04-28 20:26:12 304
原创 Roman to Integer
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.
2015-04-28 19:26:03 334
原创 Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.
2015-04-27 21:02:34 331
原创 Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using extra space?
2015-04-24 12:02:21 324
原创 Sort Colors
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.
2015-04-22 20:47:52 329
原创 3SumClosest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers.
2015-04-19 14:50:45 310
原创 3Sum
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 zero.
2015-04-19 14:15:59 328
原创 Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight).
2015-04-19 11:33:13 352 2
原创 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
2015-04-17 20:30:20 295
原创 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. For “
2015-04-17 19:33:25 444 1
原创 Majority Element
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.
2015-04-17 17:03:35 334
原创 leetCode | 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 .
2015-04-13 10:41:38 249
原创 LeetCode |Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.
2015-04-10 13:57:56 319 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人