摘要:
Longest Valid ParenthesesGiven a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substr... 阅读全文
摘要:
Insert IntervalGiven a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals... 阅读全文
摘要:
Employees Earning More Than Their ManagersTheEmployeetable holds all employees including their managers. Every employee has an Id, and there is also a... 阅读全文
摘要:
Duplicate EmailsWrite a SQL query to find all duplicate emails in a table namedPerson.+----+---------+| Id | Email |+----+---------+| 1 | a@b.com |... 阅读全文
摘要:
Customers Who Never OrderSuppose that a website contains two tables, theCustomerstable and theOrderstable. Write a SQL query to find all customers who... 阅读全文
摘要:
Delete Duplicate EmailsWrite a SQL query to delete all duplicate email entries in a table namedPerson, keeping only unique emails based on itssmallest... 阅读全文
摘要:
Rising TemperatureGiven aWeathertable, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates.+... 阅读全文
摘要:
Combine Two TablesTable:Person+-------------+---------+| Column Name | Type |+-------------+---------+| PersonId | int || FirstName | varc... 阅读全文
摘要:
Valid NumberValidate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the ... 阅读全文
摘要:
Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally ide... 阅读全文
摘要:
Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ... 阅读全文
摘要:
Majority ElementGiven an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may ass... 阅读全文
摘要:
Excel Sheet Column TitleGiven a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B ... 阅读全文
摘要:
Excel Sheet Column NumberRelated to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column ... 阅读全文
摘要:
Number of 1 BitsWrite a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For exampl... 阅读全文