- 博客(17)
- 收藏
- 关注
原创 【SQL】LeetCode-Trips and Users
LeetCode 262:Trips and Users【Description】Write a SQL query to find the cancellation rate of requests made by unbanned users (both client and driver must be unbanned) between “2013-10-01” and “2013-10-03”.The cancellation rate is computed by dividing th
2021-01-28 12:38:20 173
原创 【SQL】LeetCode-Rising Temperature
LeetCode 197:Rising Temperature【Description】Write an SQL query to find all dates’ id with higher temperature compared to its previous dates (yesterday).Return the result table in any order.The query result format is in the following example:【Solutio
2021-01-21 15:42:07 115
原创 【SQL】LeetCode-Delete Duplicate Emails
LeetCode 196:Delete Duplicate Emails【Description】Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id.For example, after running your query, the above Person table should h
2021-01-21 15:18:10 130 1
原创 【SQL】LeetCode-Department Top Three Salaries
LeetCode 185: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.The Department table holds all departments of the company.Write a SQL query to f
2021-01-18 15:38:31 101
原创 【SQL】LeetCode-Department Highest Salary
LeetCode 184: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.The Department table holds all departments of the company.Write a SQL quer
2021-01-18 15:28:42 89
原创 【SQL】LeetCode-Customers Who Never Order
LeetCode 183: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 never order anything.Table: Customers.Table: Orders.Using the above
2021-01-15 16:52:23 95
原创 【SQL】LeetCode-Duplicate Emails
LeetCode 182:Duplicate Emails【Description】Write a SQL query to find all duplicate emails in a table named Person.For example, your query should return the following for the above table:Note: All emails are in lowercase.【Solution】Personal solution:
2021-01-15 16:41:49 126 1
原创 【SQL】LeetCode-Employees Earning More Than Their Managers
LeetCode 181: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 column for the manager Id.Given the Employee table, write a SQL query tha
2021-01-15 16:00:23 84
原创 【SQL】LeetCode-Consecutive Numbers
LeetCode 180:Consecutive Numbers【Description】Write an SQL query to find all numbers that appear at least three times consecutively.Return the result table in any order.The query result format is in the following example:【Solution】SELECT DISTINCT l1.
2021-01-14 16:51:21 106
原创 【SQL】LeetCode-Rank Scores
LeetCode 178: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 ranking number should be the next consecutive integer value. In other words, t
2021-01-14 16:47:25 146 1
原创 【SQL】LeetCode-Nth Highest Salary
LeetCode 177:Nth Highest Salary【Description】Write a SQL query to get the nth highest salary from the Employee table.For example, given the above Employee table, the nth highest salary where n = 2 is 200. If there is no nth highest salary, then the quer
2021-01-14 16:41:46 89
原创 【SQL】LeetCode-Second Highest Salary
LeetCode 176:Combine Two Tables【Description】Write a SQL query to get the second highest salary from the Employee table.For example, given the above Employee table, the query should return 200 as the second highest salary. If there is no second highest
2021-01-14 16:38:49 67
原创 【SQL】LeetCode-Combine Two Tables
Combine Two Tables【Description】Write a SQL query for a report that provides the following information for each person in the Person table, regardless if there is an address for each of those people:FirstName, LastName, City, State【Solution】select Fir
2021-01-14 16:33:05 94
原创 【RN】React Native开发环境搭建记录
React Native简介React Native (简称RN)是Facebook于2015年4月开源的跨平台移动应用开发框架,是Facebook早先开源的JS框架 React 在原生移动应用平台的衍生产物,目前支持iOS和安卓两大平台。RN使用Javascript语言,类似于HTML的JSX,以及CSS来开发移动应用,因此熟悉Web前端开发的技术人员只需很少的学习就可以进入移动应用开发领域...
2019-08-02 17:17:30 160
原创 【ES6】语法笔记(二)
ECMAScript 6.0简介ECMAScript 6.0(以下简称 ES6)是 JavaScript 语言的下一代标准,已经在2015年6月正式发布了。它的目标,是使得 JavaScript 语言可以用来编写复杂的大型应用程序,成为企业级开发语言。ES6新特性四、数值扩展1、let命令:四、数值扩展1、let命令:...
2019-08-01 16:24:40 311
原创 【ES6】语法笔记(一)
ECMAScript 6.0简介ECMAScript 6.0(以下简称 ES6)是 JavaScript 语言的下一代标准,已经在2015年6月正式发布了。它的目标,是使得 JavaScript 语言可以用来编写复杂的大型应用程序,成为企业级开发语言。ES6新特性一、let 和 const 命令1、let命令:2、const命令:二、变量的解构赋值(Destructuring)1、数组的解...
2019-07-31 17:23:28 275
原创 【算法】判断一个数是否是质数
算法:判断一个数是否是质数一、质数的定义二、算法实现1、基本判断思路:2、基本判断思路改进:3、素数两性定理判断思路一、质数的定义质数(prime number)又称素数,有无限个。其定义为:在大于1的自然数中,除了1和它本身以外不再有其他因数。二、算法实现1、基本判断思路:在一般领域,对正整数n,如果用1到n-1的所有整数去除,均无法整除,则n为质数。C++代码如下 //直观判断法...
2019-04-06 16:57:58 2437
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人