摘要: Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Example 2: 很简单的链表问题,可以写成递归和迭代两种形式。具体思路: 第一步,寻找第一 阅读全文
posted @ 2018-07-02 13:17 小T在学习 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target. 阅读全文
posted @ 2018-07-02 01:01 小T在学习 阅读(920) 评论(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 @ 2018-07-01 23:39 小T在学习 阅读(233) 评论(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 @ 2018-07-01 10:25 小T在学习 阅读(1785) 评论(0) 推荐(0) 编辑
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2018-07-01 00:27 小T在学习 阅读(715) 评论(0) 推荐(0) 编辑
摘要: Given a collection of intervals, merge all overlapping intervals. Example 1: Example 2: 这道题看例子就观察到如果是按照区间最小值排过序的话会比较好做,不然的话找来找去复杂度应该会很高吧,排过序最多也就是O(nlo 阅读全文
posted @ 2018-06-30 23:40 小T在学习 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Your algorithm 阅读全文
posted @ 2018-06-29 23:18 小T在学习 阅读(183) 评论(0) 推荐(0) 编辑
摘要: A message containing letters from A-Z is being encoded to numbers using the following mapping: Given a non-empty string containing only digits, determ 阅读全文
posted @ 2018-06-29 22:54 小T在学习 阅读(1086) 评论(1) 推荐(1) 编辑
摘要: Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters in both s and t. t is po 阅读全文
posted @ 2018-06-29 14:37 小T在学习 阅读(503) 评论(0) 推荐(0) 编辑
摘要: 终于作为转专业小白的我也开始刷题啦!希望能通过记录分享的形式加深解题思路的理解和记忆。也希望大神们能够指点一二。 列表中的题目名称都是链接,难度和标签也都是也都是链接,方便归类搜索。 Total: 41. 阅读全文
posted @ 2018-06-29 12:23 小T在学习 阅读(280) 评论(0) 推荐(0) 编辑