上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页
摘要: Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST's tota... 阅读全文
posted @ 2015-07-02 08:42 lilixu 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege 阅读全文
posted @ 2015-07-01 14:37 lilixu 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Source:http://tech.pro/tutorial/2011/functional-javascript-part-4-function-curryingCurrying is the process of transforming a function that takes multi... 阅读全文
posted @ 2015-07-01 11:07 lilixu 阅读(990) 评论(0) 推荐(0) 编辑
摘要: Source: https://github.com/getify/You-Dont-Know-JS/blob/master/up%20&%20going/ch2.md#equalityFalse Values in JS""(empty string)0,-0,NaN(invalidnumber)... 阅读全文
posted @ 2015-07-01 09:06 lilixu 阅读(266) 评论(0) 推荐(0) 编辑
摘要: Given a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5","7"].类似于 Leetc... 阅读全文
posted @ 2015-06-30 21:01 lilixu 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Suppose that a website contains two tables, theCustomerstable and theOrderstable. Write a SQL query to find all customers who never order anything.Tab... 阅读全文
posted @ 2015-06-30 15:12 lilixu 阅读(447) 评论(0) 推荐(0) 编辑
摘要: +----+---------+| Id | Email |+----+---------+| 1 | a@b.com || 2 | c@d.com || 3 | a@b.com |+----+---------+For example, your query should return ... 阅读全文
posted @ 2015-06-30 14:33 lilixu 阅读(689) 评论(0) 推荐(0) 编辑
摘要: TheEmployeetable holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.+----+-------+-... 阅读全文
posted @ 2015-06-30 13:49 lilixu 阅读(325) 评论(0) 推荐(0) 编辑
摘要: Table:Person+-------------+---------+| Column Name | Type |+-------------+---------+| PersonId | int || FirstName | varchar || LastName ... 阅读全文
posted @ 2015-06-30 13:29 lilixu 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr... 阅读全文
posted @ 2015-06-30 11:49 lilixu 阅读(135) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页