LeetCode Isomorphic Strings DescriptionGiven two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with 6月 25 2015 #leetcode
LeetCode Word Break DescriptionGiven 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, givens = “leetcode”,dict = [“l 6月 25 2015 #leetcode
LeetCode Contains Duplicate2 DescriptionGiven an array of integers and an integer k, find out whether there there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at 6月 25 2015 #leetcode
LeetCode Contains Duplicate DescriptionGiven an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every 6月 25 2015 #leetcode
LeetCode Length Of Last Word DescriptionGiven a string s consists of upper/lower-case alphabets and empty space characters ‘ ‘, return the length of last word in the string. If the last word does not exist, return 0. Note: A word 6月 25 2015 #leetcode
LeetCode Happy Number DescriptionWrite an algorithm to determine if a number is “happy”. A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the 6月 25 2015 #leetcode
LeetCode Valid Palindrome DescriptionGiven a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,“A man, a plan, a canal: Panama” is a palindrome.“race a car” is no 6月 25 2015 #leetcode
LeetCode House Robber DescriptionYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adj 6月 25 2015 #leetcode
LeetCode Majority Element DescriptionGiven an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority el 6月 25 2015 #leetcode
LeetCode Merge Two Sorted Lists DescriptionMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. The original problem is here. The original code 6月 25 2015 #leetcode