随笔分类 -  LeetCode

上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
摘要:X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotate 阅读全文
posted @ 2018-03-10 12:45 __Meng 阅读(439) 评论(0) 推荐(0)
摘要:Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible stri 阅读全文
posted @ 2018-03-09 20:44 __Meng 阅读(141) 评论(0) 推荐(0)
摘要:You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in Sis a type of stone 阅读全文
posted @ 2018-03-08 21:17 __Meng 阅读(138) 评论(0) 推荐(0)
摘要:A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given an M x N matrix, return True if and only if the m 阅读全文
posted @ 2018-01-22 09:37 __Meng 阅读(902) 评论(0) 推荐(1)
摘要:Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi 阅读全文
posted @ 2018-01-21 15:31 __Meng 阅读(112) 评论(0) 推荐(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. For example, aft 阅读全文
posted @ 2018-01-20 17:18 __Meng 阅读(143) 评论(2) 推荐(0)
摘要:Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates. For example, ret 阅读全文
posted @ 2018-01-20 17:03 __Meng 阅读(170) 评论(0) 推荐(0)
摘要:Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vice ver 阅读全文
posted @ 2018-01-20 13:25 __Meng 阅读(130) 评论(0) 推荐(0)
摘要: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 a 阅读全文
posted @ 2018-01-19 17:21 __Meng 阅读(227) 评论(0) 推荐(0)
摘要:There is a table courses with columns: student and class Please list out all classes which have more than or equal to 5 students. For example, the tab 阅读全文
posted @ 2018-01-19 17:03 __Meng 阅读(227) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-01-19 16:50 __Meng 阅读(164) 评论(0) 推荐(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 阅读全文
posted @ 2018-01-19 16:30 __Meng 阅读(117) 评论(0) 推荐(0)
摘要: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: 阅读全文
posted @ 2018-01-19 16:18 __Meng 阅读(145) 评论(0) 推荐(0)
摘要:Table: Person Table: Address Write a SQL query for a report that provides the following information for each person in the Person table, regardless if 阅读全文
posted @ 2018-01-19 15:40 __Meng 阅读(115) 评论(0) 推荐(0)
摘要:X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a poster indicating the movies’ ratings and descrip 阅读全文
posted @ 2018-01-19 11:02 __Meng 阅读(149) 评论(0) 推荐(0)
摘要:There is a table World A country is big if it has an area of bigger than 3 million square km or a population of more than 25 million. Write a SQL solu 阅读全文
posted @ 2018-01-19 10:42 __Meng 阅读(157) 评论(0) 推荐(0)
摘要:You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality c 阅读全文
posted @ 2018-01-18 09:57 __Meng 阅读(121) 评论(0) 推荐(0)
摘要:Given a 32-bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: Note:Assume we are dealing with an environment which cou 阅读全文
posted @ 2018-01-17 10:33 __Meng 阅读(118) 评论(0) 推荐(0)
摘要:Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. to 阅读全文
posted @ 2018-01-16 09:51 __Meng 阅读(144) 评论(0) 推荐(0)
摘要:Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 判断一个链表是否有环 C++(10ms): 阅读全文
posted @ 2018-01-15 11:14 __Meng 阅读(139) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页