随笔分类 -  刷题笔记

上一页 1 2 3 下一页

LeetCode第[36]题(Java):Valid Sudoku
摘要:题目:有效的数独表 难度:Medium 题目内容: Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: A par 阅读全文

posted @ 2018-05-07 11:00 清风吹斜阳 阅读(333) 评论(0) 推荐(0)

LeetCode第[33]题(Java):Search in Rotated Sorted Array
摘要:题目:在翻转有序中搜索 难度: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 阅读全文

posted @ 2018-05-06 21:25 清风吹斜阳 阅读(228) 评论(0) 推荐(0)

LeetCode第[34]题(Java):Search for a Range
摘要:题目:搜索目标范围 难度:Medium 题目内容: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Yo 阅读全文

posted @ 2018-05-06 19:50 清风吹斜阳 阅读(414) 评论(0) 推荐(0)

LeetCode第[29]题(Java):Divide Two Integers
摘要:题目:两整数相除 难度:Medium 题目内容: Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return 阅读全文

posted @ 2018-05-03 11:40 清风吹斜阳 阅读(311) 评论(0) 推荐(0)

LeetCode第[22]题(Java):Generate Parentheses
摘要:题目:制造括号序列 难度:Medium 题目内容: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. 翻译: 给定n对括号,写一个函数来生成所 阅读全文

posted @ 2018-04-23 23:16 清风吹斜阳 阅读(325) 评论(0) 推荐(0)

LeetCode第[21][23]题(Java):Merge Sorted Lists
摘要:题目:合并两个已排序链表 难度: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 阅读全文

posted @ 2018-04-23 19:25 清风吹斜阳 阅读(312) 评论(0) 推荐(0)

LeetCode第[20]题(Java):Valid Parentheses
摘要:题目:有效的括号序列 难度:Easy 题目内容: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An inp 阅读全文

posted @ 2018-04-22 18:40 清风吹斜阳 阅读(1318) 评论(0) 推荐(0)

LeetCode第[19]题(Java):Remove Nth Node From End of List(删除链表的倒数第N个节点)
摘要:题目:删除链表的倒数第N个节点 难度:Medium 题目内容: Given a linked list, remove the n-th node from the end of list and return its head. 翻译:给定一个链表,删除倒数第n个节点并返回其头部。 Example 阅读全文

posted @ 2018-04-22 16:35 清风吹斜阳 阅读(239) 评论(0) 推荐(0)

LeetCode第[17]题(Java):Letter Combinations of a Phone Number
摘要:题目:最长公共前缀 难度:EASY 题目内容: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. 阅读全文

posted @ 2018-04-22 12:07 清风吹斜阳 阅读(416) 评论(0) 推荐(0)

LeetCode第[14]题(Java): Longest Common Prefix
摘要:题目:最长公共前缀 难度:EASY 题目内容: Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an 阅读全文

posted @ 2018-04-21 22:51 清风吹斜阳 阅读(358) 评论(0) 推荐(0)

LeetCode第[13]题(Java):Roman to Integer
摘要:题目:罗马数字转换 题目难度: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 阅读全文

posted @ 2018-04-18 23:48 清风吹斜阳 阅读(301) 评论(0) 推荐(0)

LeetCode第[7]题(Java):Reverse Integer 标签:数学
摘要:题目:Reverse Integer 难度:Easy 题目内容: Given a 32-bit signed integer, reverse digits of an integer. Note:Assume we are dealing with an environment which cou 阅读全文

posted @ 2018-03-25 19:34 清风吹斜阳 阅读(487) 评论(0) 推荐(0)

【牛客网】左右最值最大差
摘要:题目内容: 给定一个长度为N(N>1)的整型数组A,可以将A划分成左右两个部分,左部分A[0..K],右部分A[K+1..N-1],K可以取值的范围是[0,N-2]。求这么多划分方案中,左部分中的最大值减去右部分最大值的绝对值,最大是多少? 给定整数数组A和数组的大小n,请返回题目所求的答案。 测试 阅读全文

posted @ 2018-03-21 16:40 清风吹斜阳 阅读(322) 评论(0) 推荐(0)

LeetCode第[5]题(Java):Longest Palindromic Substring 标签:String、动态规划
摘要:题目中文:求最长回文子串 题目难度:Medium 题目内容: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. 翻译: 阅读全文

posted @ 2018-03-19 18:00 清风吹斜阳 阅读(753) 评论(0) 推荐(0)

LeetCode第[3]题(Java):Longest Substring Without Repeating Characters 标签:Linked List
摘要:题目中文:没有重复字符的最长子串 题目难度:Medium 题目内容: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", 阅读全文

posted @ 2018-03-08 17:46 清风吹斜阳 阅读(639) 评论(2) 推荐(0)

LeetCode第[2]题(Java):Add Two Numbers (链表相加)——Medium
摘要:题目难度: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 阅读全文

posted @ 2018-03-01 11:14 清风吹斜阳 阅读(588) 评论(0) 推荐(0)

LeetCode第[26]题(Java):Remove Duplicates from Sorted Array 标签:Array
摘要:题目难度: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 阅读全文

posted @ 2018-02-27 23:21 清风吹斜阳 阅读(434) 评论(0) 推荐(0)

LeetCode第[18]题(Java):4Sum (四个数的和为目标值)——Medium
摘要:题目难度: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 阅读全文

posted @ 2018-01-15 23:31 清风吹斜阳 阅读(1102) 评论(0) 推荐(0)

LeetCode第[16]题(Java):3Sum Closest (和目标值最接近的三个数的和)——Medium
摘要:题目难度: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 阅读全文

posted @ 2018-01-09 23:27 清风吹斜阳 阅读(470) 评论(0) 推荐(0)

LeetCode第[15]题(Java):3Sum (三数之和为目标值)——Medium
摘要:题目难度: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 阅读全文

posted @ 2018-01-09 00:17 清风吹斜阳 阅读(2589) 评论(1) 推荐(1)

上一页 1 2 3 下一页

导航