上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 29 下一页
摘要: Given a linked list, remove the *n*-th node from the end of list and return its head. 阅读全文
posted @ 2019-04-26 10:37 yjxyy 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 输入n个整数,找出其中最小的K个数。例如输入4,5,1,6,2,7,3,8这8个数字,则最小的4个数字是1,2,3,4,。 阅读全文
posted @ 2019-04-26 10:34 yjxyy 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 数组中有一个数字出现的次数超过数组长度的一半,请找出这个数字。例如输入一个长度为9的数组{1,2,3,2,2,2,5,4,2}。由于数字2在数组中出现了5次,超过数组长度的一半,因此输出2。如果不存在则输出0。 阅读全文
posted @ 2019-04-26 10:31 yjxyy 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 输入一个字符串,按字典序打印出该字符串中字符的所有排列。例如输入字符串abc,则打印出由字符a,b,c所能排列出来的所有字符串abc,acb,bac,bca,cab和cba。 阅读全文
posted @ 2019-04-26 10:27 yjxyy 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 输入一棵二叉搜索树,将该二叉搜索树转换成一个排序的双向链表。要求不能创建任何新的结点,只能调整树中结点指针的指向。 阅读全文
posted @ 2019-04-23 23:28 yjxyy 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 输入一个复杂链表(每个节点中有节点值,以及两个指针,一个指向下一个节点,另一个特殊指针指向任意一个节点),返回结果为复制后复杂链表的head。 阅读全文
posted @ 2019-04-23 23:26 yjxyy 阅读(82) 评论(0) 推荐(0) 编辑
摘要: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. 阅读全文
posted @ 2019-04-21 12:05 yjxyy 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. 阅读全文
posted @ 2019-04-21 12:02 yjxyy 阅读(123) 评论(0) 推荐(0) 编辑
摘要: the container contains the most water. 阅读全文
posted @ 2019-04-21 11:58 yjxyy 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 输入一颗二叉树的跟节点和一个整数,打印出二叉树中结点值的和为输入整数的所有路径。路径定义为从树的根结点开始往下一直到叶结点所经过的结点形成一条路径。(注意: 在返回值的list中,数组长度大的数组靠前) 阅读全文
posted @ 2019-04-21 11:36 yjxyy 阅读(148) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 29 下一页