上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页
摘要: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
posted @ 2017-01-24 13:08 lettuan 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer represented as non-empty a singly linked list of digits, plus one to the integer. You may assume the integer do not conta 阅读全文
posted @ 2017-01-23 14:26 lettuan 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 - 阅读全文
posted @ 2017-01-23 12:33 lettuan 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space? 思路: 一开始我想到的方法伪码如下: while head不空: 阅读全文
posted @ 2017-01-23 12:18 lettuan 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2- 阅读全文
posted @ 2017-01-23 02:31 lettuan 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Write a SQL query to find all numbers that appear at least three times consecutively. For example, given the above Logs table, 1 is the only number th 阅读全文
posted @ 2017-01-21 05:13 lettuan 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 参考: https://my.oschina.net/Tsybius2014/blog/493244 常见的排序1. 排名1,2,3,...,n 不对重复的分数做特殊处理 Score Rank 100 1 99 2 99 3 98 4 90 5 排序2. 相同分数排名相同,排名第n名表示前面有n-1 阅读全文
posted @ 2017-01-21 04:58 lettuan 阅读(578) 评论(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. Id is the primar 阅读全文
posted @ 2017-01-17 02:39 lettuan 阅读(325) 评论(0) 推荐(0) 编辑
摘要: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This 阅读全文
posted @ 2017-01-17 02:23 lettuan 阅读(135) 评论(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 @ 2017-01-16 14:36 lettuan 阅读(132) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页