摘要:题目:有效的数独表 难度:Medium 题目内容: Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: A par
阅读全文
摘要:题目:在翻转有序中搜索 难度:Medium 题目内容: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] migh
阅读全文
摘要:题目:搜索目标范围 难度:Medium 题目内容: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Yo
阅读全文
摘要:题目:两整数相除 难度:Medium 题目内容: Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return
阅读全文
摘要:题目:制造括号序列 难度:Medium 题目内容: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. 翻译: 给定n对括号,写一个函数来生成所
阅读全文
摘要:题目:合并两个已排序链表 难度:Easy 题目内容: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of th
阅读全文
摘要:题目:有效的括号序列 难度:Easy 题目内容: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An inp
阅读全文
摘要:题目:删除链表的倒数第N个节点 难度:Medium 题目内容: Given a linked list, remove the n-th node from the end of list and return its head. 翻译:给定一个链表,删除倒数第n个节点并返回其头部。 Example
阅读全文
摘要:题目:最长公共前缀 难度:EASY 题目内容: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.
阅读全文
摘要:题目:最长公共前缀 难度:EASY 题目内容: Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an
阅读全文
摘要:题目:罗马数字转换 题目难度:easy 题目内容:Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, two is written as II in Roman
阅读全文
摘要:题目:Reverse Integer 难度:Easy 题目内容: Given a 32-bit signed integer, reverse digits of an integer. Note:Assume we are dealing with an environment which cou
阅读全文
摘要:题目内容: 给定一个长度为N(N>1)的整型数组A,可以将A划分成左右两个部分,左部分A[0..K],右部分A[K+1..N-1],K可以取值的范围是[0,N-2]。求这么多划分方案中,左部分中的最大值减去右部分最大值的绝对值,最大是多少? 给定整数数组A和数组的大小n,请返回题目所求的答案。 测试
阅读全文
摘要:题目中文:求最长回文子串 题目难度:Medium 题目内容: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. 翻译:
阅读全文
摘要:题目中文:没有重复字符的最长子串 题目难度:Medium 题目内容: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb",
阅读全文
摘要:题目难度:Medium 题目: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of th
阅读全文
摘要:题目难度:Easy 题目: Given a sorted array, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate
阅读全文
摘要:题目难度:Medium 题目: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets i
阅读全文
摘要:题目难度:Medium 题目: 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
阅读全文
摘要:题目难度:Medium 题目: 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 g
阅读全文