摘要: Valid ParenthesesGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must clos... 阅读全文
posted @ 2015-05-17 16:44 `Liok 阅读(669) 评论(0) 推荐(0) 编辑
摘要: Remove Nth Node From End of ListGiven a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2... 阅读全文
posted @ 2015-05-17 16:28 `Liok 阅读(453) 评论(0) 推荐(0) 编辑
摘要: Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents yo... 阅读全文
posted @ 2015-05-17 11:34 `Liok 阅读(520) 评论(0) 推荐(0) 编辑
摘要: Longest Valid ParenthesesGiven a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substr... 阅读全文
posted @ 2015-05-16 17:22 `Liok 阅读(406) 评论(0) 推荐(0) 编辑
摘要: Insert IntervalGiven a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals... 阅读全文
posted @ 2015-05-16 16:49 `Liok 阅读(543) 评论(0) 推荐(0) 编辑
摘要: Employees Earning More Than Their ManagersTheEmployeetable holds all employees including their managers. Every employee has an Id, and there is also a... 阅读全文
posted @ 2015-05-16 16:38 `Liok 阅读(302) 评论(0) 推荐(0) 编辑
摘要: Duplicate EmailsWrite a SQL query to find all duplicate emails in a table namedPerson.+----+---------+| Id | Email |+----+---------+| 1 | a@b.com |... 阅读全文
posted @ 2015-05-16 16:36 `Liok 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Customers Who Never OrderSuppose that a website contains two tables, theCustomerstable and theOrderstable. Write a SQL query to find all customers who... 阅读全文
posted @ 2015-05-16 16:34 `Liok 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Delete Duplicate EmailsWrite a SQL query to delete all duplicate email entries in a table namedPerson, keeping only unique emails based on itssmallest... 阅读全文
posted @ 2015-05-16 16:32 `Liok 阅读(591) 评论(0) 推荐(0) 编辑
摘要: Rising TemperatureGiven aWeathertable, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates.+... 阅读全文
posted @ 2015-05-16 16:30 `Liok 阅读(393) 评论(0) 推荐(0) 编辑