
leetcode
文章平均质量分 57
火打劫
这个作者很懒,什么都没留下…
展开
-
leetcode-database-178.Rank Scores
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.原创 2016-06-07 14:41:11 · 611 阅读 · 0 评论 -
leetcode-shell-192. Word Frequency
Write a bash script to calculate the frequency of each word in a text file words.txt.For simplicity sake, you may assume:words.txt contains only lowercase characters and space ' ' characters.E原创 2016-06-16 16:03:45 · 469 阅读 · 0 评论 -
leetcode-shell-193. Valid Phone Numbers
Given a text file file.txt that contains list of phone numbers (one per line), write a one liner bash script to print all valid phone numbers.You may assume that a valid phone number must appear i原创 2016-06-16 16:02:58 · 514 阅读 · 0 评论 -
leetcode-shell-195. Tenth Line
How would you print just the 10th line of a file?For example, assume that file.txt has the following content:Line 1Line 2Line 3Line 4Line 5Line 6Line 7Line 8Line 9Line 10You原创 2016-06-15 14:16:01 · 370 阅读 · 0 评论 -
leetcode-database-177. Nth Highest Salary
Write a SQL query to get the nth highest salary from the Employee table.+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2 | 200 || 3 | 300 |+----+--------+原创 2016-06-15 14:15:14 · 475 阅读 · 0 评论 -
leetcode-database-178. Rank Scores
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.原创 2016-06-15 14:14:34 · 528 阅读 · 0 评论 -
leetcode-database-262. Trips and Users
The Trips table holds all taxi trips. Each trip has a unique Id, while Client_Id and Driver_Id are both foreign keys to the Users_Id at the Users table. Status is an ENUM type of (‘completed’, ‘ca原创 2016-06-15 14:13:55 · 345 阅读 · 0 评论 -
leetcode-database-185. Department Top Three Salaries
The Employee table holds all employees. Every employee has an Id, and there is also a column for the department Id.+----+-------+--------+--------------+| Id | Name | Salary | DepartmentId |+--原创 2016-06-14 14:43:31 · 357 阅读 · 0 评论 -
leetcode-database-180. Consecutive Numbers
Write a SQL query to find all numbers that appear at least three times consecutively.+----+-----+| Id | Num |+----+-----+| 1 | 1 || 2 | 1 || 3 | 1 || 4 | 2 || 5 | 1 || 6 | 2原创 2016-06-07 16:19:37 · 302 阅读 · 0 评论 -
leetcode-shell-194. Transpose File
Given a text file file.txt, transpose its content.You may assume that each row has the same number of columns and each field is separated by the ' ' character.For example, if file.txt has the foll原创 2016-06-16 16:04:19 · 669 阅读 · 0 评论