自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

u013383813的博客

goodgoodstudy daydayup

  • 博客(29)
  • 问答 (1)
  • 收藏
  • 关注

原创 [LeetCode] 162. Find Peak Element

题:题目A peak element is an element that is greater than its neighbors.Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element and return its index.The array may contain multiple pe...

2018-09-30 20:02:23 84

原创 [LeetCode] 334. Increasing Triplet Subsequence

题:https://leetcode.com/problems/game-of-life/description/题目According to the Wikipedia’s article: “The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathemat...

2018-09-29 20:09:52 164

原创 [LeetCode] 334. Increasing Triplet Subsequence

题:https://leetcode.com/problems/increasing-triplet-subsequence/description/题目Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array.Formally the fun...

2018-09-28 15:16:09 90

原创 [LeetCode] 103. Binary Tree Zigzag Level Order Traversal

题:https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/description/题目Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, the...

2018-09-27 15:24:42 64

原创 [LeetCode] 73. Set Matrix Zeroes

题:https://leetcode.com/problems/set-matrix-zeroes/description/题目Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place.Example 1:Input: [ [1,1,1], [1,0,1...

2018-09-27 09:02:23 66

原创 [LeetCode] 131. Palindrome Partitioning

题:https://leetcode.com/problems/palindrome-partitioning/submissions/1题目Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partit...

2018-09-26 23:01:15 127

原创 [LeetCode] 116. Populating Next Right Pointers in Each Node

题:https://leetcode.com/problems/populating-next-right-pointers-in-each-node/description/题目Given a binary treestruct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next;...

2018-09-26 14:48:53 67

原创 [LeetCode] 395. Longest Substring with At Least K Repeating Characters

题:https://leetcode.com/problems/longest-substring-with-at-least-k-repeating-characters/description/题目Find the length of the longest substring T of a given string (consists of lowercase letters only)...

2018-09-25 15:34:51 170

原创 [LeetCode] 210. Course Schedule II

题:https://leetcode.com/problems/course-schedule-ii/description/题目There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take cour...

2018-09-25 09:26:48 100

原创 [LeetCode] 134. Gas Station

题:https://leetcode.com/problems/gas-station/description/题目There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank a...

2018-09-24 15:39:46 83

原创 [LeetCode] 227. Basic Calculator II

题:https://leetcode.com/problems/basic-calculator-ii/description/题目Implement a basic calculator to evaluate a simple expression string.The expression string contains only non-negative integers, +, -...

2018-09-24 11:21:49 92

原创 [LeetCode] 324. Wiggle Sort II

题:https://leetcode.com/problems/wiggle-sort-ii/description/题目Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3]…Example 1:Input: nums = [1, 5, 1, 1, ...

2018-09-23 10:07:02 482

原创 [LeetCode] 179. Largest Number

题:https://leetcode.com/problems/largest-number/description/题目Given a list of non negative integers, arrange them such that they form the largest number.*Example 1:Input: [10,2]Output: "210"Exam...

2018-09-19 17:58:56 102

原创 python3 sorted( ) 没有 cmp参数, 使用 cmp的方法

一般的 sorted 排序函数 都有相应的 cmp函数,用来定制化排序的比较方法。然而 python 3中的 sorted( ) 除去的cmp 参数,推荐使用 key。Python中有相应的函数 支持将 cmp函数转化为key的值。import functoolsdef tcmp(a,b): if a > b : return -1 elif a < b : ret...

2018-09-19 17:15:46 11393 6

原创 [LeetCode] 127. Word Ladder

题:https://leetcode.com/problems/word-ladder/description/题目Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to...

2018-09-18 15:46:04 93

原创 [LeetCode] 547. Friend Circles

题:https://leetcode.com/problems/friend-circles/description/题目There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, i...

2018-09-15 10:22:45 102

原创 [LeetCode] 166. Fraction to Recurring Decimal

题:https://leetcode.com/problems/fraction-to-recurring-decimal/description/题目Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If t...

2018-09-13 15:13:14 81

原创 [LeetCode] 50. Pow(x, n)

题:https://leetcode.com/problems/powx-n/description/题目Implement pow(x, n), which calculates x raised to the power n (xn).Example 1:Input: 2.00000, 10Output: 1024.00000Example 2:Input: ...

2018-09-13 10:30:37 62

原创 [LeetCode] 16. 3Sum Closest

题:https://leetcode.com/problems/3sum-closest/description/题目Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the s...

2018-09-12 10:57:58 57

原创 [LeetCode] 54. Spiral Matrix

题:https://leetcode.com/problems/spiral-matrix/description/题目Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.Example 1:Input:[ [ 1, 2...

2018-09-12 10:08:24 103

原创 [LeetCode] 36. Valid Sudoku

题:https://leetcode.com/problems/valid-sudoku/description/题目Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:Each row must co...

2018-09-10 14:55:10 118

原创 [LeetCode] 28. Implement strStr()

题:https://leetcode.com/problems/divide-two-integers/description/题目Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator.Return the ...

2018-09-10 11:33:20 76

原创 [LeetCode] 28. Implement strStr()

题:https://leetcode.com/problems/implement-strstr/description/题目Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Exam...

2018-09-09 21:55:30 65

原创 [LeetCode] 26. Remove Duplicates from Sorted Array

题:https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/题目Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the n...

2018-09-09 20:02:05 68

原创 [LeetCode] 560. Subarray Sum Equals K

题:https://leetcode.com/submissions/detail/174200311/题目Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X ...

2018-09-06 22:01:19 62

原创 [LeetCode] 560. Subarray Sum Equals K

题:https://leetcode.com/problems/subarray-sum-equals-k/description/题目Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k.E...

2018-09-05 11:04:21 86

原创 [LeetCode] 7. Reverse Integer

题:https://leetcode.com/problems/reverse-integer/description/题目Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -3...

2018-09-05 09:28:28 64

原创 [LeetCode] 695. Max Area of Island

题:https://leetcode.com/problems/max-area-of-island/description/题目Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) connected 4-directionally (horizo...

2018-09-03 19:04:57 81

原创 [LeetCode] 581. Shortest Unsorted Continuous Subarray

题:https://leetcode.com/problems/shortest-unsorted-continuous-subarray/description/题目Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascendin...

2018-09-03 09:48:53 63

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除