上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 32 下一页
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2022-11-05 21:35 MarkLeeBYR 阅读(35) 评论(0) 推荐(0)
摘要: Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list. 本题我们可以借助一个Stack来解题。我们从链表头部开始,向Stack中插入k个节点,然 阅读全文
posted @ 2022-11-05 17:29 MarkLeeBYR 阅读(35) 评论(0) 推荐(0)
摘要: Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Your a 阅读全文
posted @ 2022-11-04 09:48 MarkLeeBYR 阅读(13) 评论(0) 推荐(0)
摘要: You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list 阅读全文
posted @ 2022-11-03 13:26 MarkLeeBYR 阅读(33) 评论(0) 推荐(0)
摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ 阅读全文
posted @ 2022-11-03 11:02 MarkLeeBYR 阅读(32) 评论(0) 推荐(0)
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. public L 阅读全文
posted @ 2022-11-03 10:41 MarkLeeBYR 阅读(23) 评论(0) 推荐(0)
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
posted @ 2022-11-03 10:14 MarkLeeBYR 阅读(22) 评论(0) 推荐(0)
摘要: Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After rem 阅读全文
posted @ 2022-11-03 09:46 MarkLeeBYR 阅读(18) 评论(0) 推荐(0)
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of 阅读全文
posted @ 2022-11-02 11:55 MarkLeeBYR 阅读(23) 评论(0) 推荐(0)
摘要: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文
posted @ 2022-11-01 14:04 MarkLeeBYR 阅读(22) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 32 下一页