代码改变世界

[LeetCode] 168. Excel Sheet Column Title_Easy tag: Math

2018-08-17 10:02 by Johnson_强生仔仔, 277 阅读, 0 推荐, 收藏, 编辑
摘要:Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: Example 1: Example 2: Example 3: 这个题目实际上就想用2 阅读全文

[LeetCode] 836. Rectangle Overlap_Easy

2018-08-17 06:01 by Johnson_强生仔仔, 211 阅读, 0 推荐, 收藏, 编辑
摘要:A rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) are the coordinates of its bottom-left corner, and (x2, y2) are the coordinates 阅读全文

[LeetCode] 345. Reverse Vowels of a String_Easy tag:Two Pointers

2018-08-17 03:37 by Johnson_强生仔仔, 187 阅读, 0 推荐, 收藏, 编辑
摘要:Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Example 2: Input: "leetcode" Output: "leotcede" Exam 阅读全文

[LeetCode] 196. Delete Duplicate Emails_Easy tag: SQL

2018-08-17 00:46 by Johnson_强生仔仔, 185 阅读, 0 推荐, 收藏, 编辑
摘要:Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id. + + + | Id | Ema 阅读全文

[LeetCode] 832. Flipping an Image_Easy

2018-08-17 00:35 by Johnson_强生仔仔, 228 阅读, 0 推荐, 收藏, 编辑
摘要:Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. To flip an image horizontally means t 阅读全文

[LeetCode] 190. Reverse Bits_Easy tag: Bit Manipulation

2018-08-16 23:13 by Johnson_强生仔仔, 175 阅读, 0 推荐, 收藏, 编辑
摘要:Reverse bits of a given 32 bits unsigned integer. Example: Follow up:If this function is called many times, how would you optimize it? 这个题目就是利用Bit Man 阅读全文

[LeetCode] 243. Shortest Word Distance_Easy

2018-08-16 12:08 by Johnson_强生仔仔, 194 阅读, 0 推荐, 收藏, 编辑
摘要:Given a list of words and two words word1 and word2, return the shortest distance between these two words in the list. Example:Assume that words = ["p 阅读全文

[LeetCode] 256. Paint House_Easy tag: Dynamic Programming

2018-08-16 11:17 by Johnson_强生仔仔, 200 阅读, 0 推荐, 收藏, 编辑
摘要:There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a certai 阅读全文

[LeetCode] 172. Factorial Trailing Zeroes_Easy tag: Math

2018-08-16 10:46 by Johnson_强生仔仔, 198 阅读, 0 推荐, 收藏, 编辑
摘要:Given an integer n, return the number of trailing zeroes in n!. Example 1: Example 2: Note: Your solution should be in logarithmic time complexity. 思路 阅读全文

[LeetCode] 181. Employees Earning More Than Their Managers_Easy tag: SQL

2018-08-16 10:24 by Johnson_强生仔仔, 161 阅读, 0 推荐, 收藏, 编辑
摘要: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 Em 阅读全文
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 39 下一页