自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(185)
  • 收藏
  • 关注

转载 185. Department Top Three Salaries

https://leetcode.com/problems/department-top-three-salaries/description/The Employee table holds all employees. Every employee has an Id, and there is also a column for the department Id.+----+--...

2018-09-16 22:58:13 144

转载 184. Department Highest Salary

https://leetcode.com/problems/department-highest-salary/description/The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id.+-...

2018-09-16 22:57:30 157

原创 183. Customers Who Never Order

https://leetcode.com/problems/customers-who-never-order/description/Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL query to find all customers who ...

2018-09-16 22:56:24 135

原创 182. Duplicate Emails

https://leetcode.com/problems/duplicate-emails/description/Write a SQL query to find all duplicate emails in a table named Person.+----+---------+| Id | Email |+----+---------+| 1 | [email protected]...

2018-09-16 22:55:36 102

原创 181. Employees Earning More Than Their Managers

https://leetcode.com/problems/employees-earning-more-than-their-managers/description/The Employee table holds all employees including their managers. Every employee has an Id, and there is also a co...

2018-09-16 22:54:39 120

转载 180. Consecutive Numbers

https://leetcode.com/problems/consecutive-numbers/description/Write a SQL query to find all numbers that appear at least three times consecutively.+----+-----+| Id | Num |+----+-----+| 1 | 1...

2018-09-12 22:57:13 109

原创 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"Exampl...

2018-09-12 22:54:54 169

转载 178. Rank Scores

https://leetcode.com/problems/rank-scores/description/Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranki...

2018-09-12 22:38:39 107

转载 177. Nth Highest Salary

https://leetcode.com/problems/nth-highest-salary/description/Write a SQL query to get the nth highest salary from the Employee table.+----+--------+| Id | Salary |+----+--------+| 1 | 100 ...

2018-09-12 22:34:12 99

原创 176. Second Highest Salary

https://leetcode.com/problems/second-highest-salary/description/Write a SQL query to get the second highest salary from the Employee table.+----+--------+| Id | Salary |+----+--------+| 1 | 1...

2018-09-12 22:31:24 97

原创 175. Combine Two Tables

https://leetcode.com/problems/combine-two-tables/description/Table: Person+-------------+---------+| Column Name | Type |+-------------+---------+| PersonId | int || FirstName | v...

2018-09-11 22:10:23 106

原创 174. Dungeon Game

https://leetcode.com/problems/dungeon-game/description/The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid o...

2018-09-11 22:09:31 92

原创 173. Binary Search Tree Iterator

https://leetcode.com/problems/binary-search-tree-iterator/description/Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling n...

2018-09-11 22:08:42 105

原创 172. Factorial Trailing Zeroes

https://leetcode.com/problems/factorial-trailing-zeroes/description/Given an integer n, return the number of trailing zeroes in n!.Example 1:Input: 3Output: 0Explanation: 3! = 6, no trailing ...

2018-09-11 22:07:57 83

原创 171. Excel Sheet Column Number

https://leetcode.com/problems/excel-sheet-column-number/description/Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -&gt...

2018-09-09 10:02:44 70

原创 170. Two Sum III - Data structure design

https://leetcode.com/problems/two-sum-iii-data-structure-design/description/Design and implement a TwoSum class. It should support the following operations: add and find.add - Add the number to an...

2018-09-08 11:22:26 136

原创 169. Majority Element

https://leetcode.com/problems/majority-element/description/Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may ass...

2018-09-08 10:35:50 89

原创 168. Excel Sheet Column Title

https://leetcode.com/problems/excel-sheet-column-title/description/Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -&...

2018-09-08 10:29:16 86

原创 167. Two Sum II - Input array is sorted

https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific ...

2018-09-08 10:02:54 83

原创 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 the fra...

2018-09-07 23:28:19 73

转载 165. Compare Version Numbers

https://leetcode.com/problems/compare-version-numbers/description/Compare two version numbers version1 and version2.If version1 > version2 return 1; if version1 < version2 return -1;otherwise...

2018-09-07 21:18:40 75

转载 164. Maximum Gap

https://leetcode.com/problems/maximum-gap/description/Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Return 0 if the array contains less th...

2018-09-07 21:15:51 91

原创 163. Missing Ranges

https://leetcode.com/problems/missing-ranges/description/Given a sorted integer array nums, where the range of elements are in the inclusive range [lower, upper], return its missing ranges.Example...

2018-09-07 21:14:08 67

原创 162. Find Peak Element

https://leetcode.com/problems/find-peak-element/description/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 elemen...

2018-09-07 21:07:58 70

原创 161. One Edit Distance

https://leetcode.com/problems/one-edit-distance/description/Given two strings s and t, determine if they are both one edit distance apart.Note: There are 3 possiblities to satisify one edit dist...

2018-09-06 23:10:05 45

原创 160. Intersection of Two Linked Lists

https://leetcode.com/problems/intersection-of-two-linked-lists/description/Write a program to find the node at which the intersection of two singly linked lists begins. For example, the followin...

2018-09-03 21:43:51 43

转载 159. Longest Substring with At Most Two Distinct Characters

https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/description/Given a string s , find the length of the longest substring t  that contains at most 2 distinct chara...

2018-09-03 21:26:42 103

转载 158. Read N Characters Given Read4 II - Call multiple times

https://leetcode.com/problems/read-n-characters-given-read4-ii-call-multiple-times/description/The API: int read4(char *buf) reads 4 characters at a time from a file.The return value is the actual...

2018-09-03 20:51:35 65

原创 157. Read N Characters Given Read4

https://leetcode.com/problems/read-n-characters-given-read4/description/The API: int read4(char *buf) reads 4 characters at a time from a file.The return value is the actual number of characters r...

2018-09-03 20:49:26 88

原创 156. Binary Tree Upside Down

https://leetcode.com/problems/binary-tree-upside-down/description/Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or...

2018-09-03 20:44:02 90

原创 155. Min Stack

https://leetcode.com/problems/min-stack/description/Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack. pop() --...

2018-09-02 23:12:12 50

转载 154. Find Minimum in Rotated Sorted Array II

https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/description/Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e.,  [0,1,2,4,5,6...

2018-09-02 20:54:42 70

原创 153. Find Minimum in Rotated Sorted Array

https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/description/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]...

2018-09-02 20:47:42 65

转载 152. Maximum Product Subarray

https://leetcode.com/problems/maximum-product-subarray/description/Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest pr...

2018-09-02 20:29:00 64

原创 151. Reverse Words in a String

https://leetcode.com/problems/reverse-words-in-a-string/description/Given an input string, reverse the string word by word.Example:  Input: "the sky is blue",Output: "blue is sky the".Note:...

2018-09-02 20:02:38 77

原创 150. Evaluate Reverse Polish Notation

https://leetcode.com/problems/evaluate-reverse-polish-notation/description/Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand ma...

2018-09-01 23:02:08 48

转载 149. Max Points on a Line

https://leetcode.com/problems/max-points-on-a-line/description/Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.Example 1:Input: [[1,1],[2,2],[...

2018-09-01 22:10:05 57

转载 148. Sort List

https://leetcode.com/problems/sort-list/description/Sort a linked list in O(n log n) time using constant space complexity.Example 1:Input: 4->2->1->3Output: 1->2->3->4Exam...

2018-09-01 22:05:30 58

原创 147. Insertion Sort List

https://leetcode.com/problems/insertion-sort-list/description/Sort a linked list using insertion sort.A graphical example of insertion sort. The partial sorted list (black) initially contains onl...

2018-09-01 22:02:54 97

原创 146. LRU Cache

https://leetcode.com/problems/lru-cache/description/Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put.get(key) - Ge...

2018-09-01 21:30:37 69

空空如也

空空如也

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

TA关注的人

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