摘要: 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-04-01 21:53 Tsunami_lj 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According 阅读全文
posted @ 2017-04-01 21:36 Tsunami_lj 阅读(92) 评论(0) 推荐(0) 编辑
摘要: There is a list of sorted integers from 1 to n. Starting from left to right, remove the first number and every other number afterward until you reach 阅读全文
posted @ 2017-04-01 15:56 Tsunami_lj 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 阅读全文
posted @ 2017-04-01 14:46 Tsunami_lj 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文
posted @ 2017-04-01 12:30 Tsunami_lj 阅读(134) 评论(0) 推荐(0) 编辑