摘要: Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the 阅读全文
posted @ 2018-10-14 10:42 bernieloveslife 阅读(125) 评论(0) 推荐(0)
摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in place, which 阅读全文
posted @ 2018-10-14 10:42 bernieloveslife 阅读(393) 评论(0) 推荐(0)
摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: Input: [1,1,2] Output: [ [1,1,2], [1,2, 阅读全文
posted @ 2018-10-14 10:42 bernieloveslife 阅读(67) 评论(0) 推荐(0)
摘要: Given a linked list, swap every two adjacent nodes and return its head. Example: Given 1 2 3 4, you should return the list as 2 1 4 3. Note: Your algo 阅读全文
posted @ 2018-10-14 10:42 bernieloveslife 阅读(82) 评论(0) 推荐(0)
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1 4 5, 1 3 4, 2 6 ] Output: 1 1 2 阅读全文
posted @ 2018-10-14 10:42 bernieloveslife 阅读(90) 评论(0) 推荐(0)