![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
课程作业
catik
SYSU student
展开
-
leetcode题目例题解析(二)
leetcode题目例题解析(二)Subsets题目描述: Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example, If nums = [1,2,原创 2017-09-15 20:59:49 · 280 阅读 · 0 评论 -
leetcode题目例题解析(十四)
leetcode题目例题解析(十四)Find Peak Element题目描述: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.原创 2017-12-30 00:13:59 · 212 阅读 · 0 评论 -
leetcode题目例题解析(十三)
leetcode题目例题解析(十三)Letter Combinations of a Phone Number题目描述: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just原创 2017-12-28 20:32:22 · 222 阅读 · 0 评论 -
leetcode题目例题解析(十二)
leetcode题目例题解析(十一)First Missing Positive题目描述: Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. You原创 2017-12-28 19:14:36 · 264 阅读 · 0 评论 -
8.20
题目:In an undirected graph G = (V, E), we say D ⊆ V is a dominating set if every v ∈ V is either in D or adjacent to at least one member of D. In the DOMINATING SET problem, the input is a graph and a b原创 2017-12-30 23:51:44 · 267 阅读 · 0 评论 -
leetcode题目例题解析(十六)
leetcode题目例题解析(十六)Valid Parentheses题目描述: Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. The brackets must close in the corre原创 2017-12-30 23:26:36 · 296 阅读 · 0 评论 -
leetcode题目例题解析(十)
leetcode题目例题解析(十)Partition List题目描述: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the origina原创 2017-11-30 19:55:17 · 246 阅读 · 0 评论 -
leetcode题目例题解析(十一)
leetcode题目例题解析(十一)Combinations题目描述: Given two integers n and k, return all possible combinations of k numbers out of 1 … n. For example, If n = 4 and k = 2, a solution is: [[2,4],原创 2017-11-30 20:42:30 · 209 阅读 · 0 评论 -
leetcode题目例题解析(五)
leetcode题目例题解析(五)Generate Parentheses题目描述: 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: [转载 2017-10-15 11:34:38 · 239 阅读 · 0 评论 -
leetcode题目例题解析(七)
leetcode题目例题解析(七)Swap Nodes in Pairs题目描述: 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. You原创 2017-10-23 01:12:46 · 299 阅读 · 0 评论 -
leetcode题目例题解析(六)
leetcode题目例题解析(六)Valid Sudoku题目描述: Determine if a Sudoku is valid The Sudoku board could be partially filled, where empty cells are filled with the character ‘.’. 题意解析: 这道题就是判断一个给定的数独是否是合理的,原创 2017-10-23 00:50:54 · 246 阅读 · 0 评论 -
leetcode题目例题解析(六)
leetcode题目例题解析(六)原创 2017-10-23 00:12:25 · 318 阅读 · 0 评论 -
leetcode题目例题解析(九)
leetcode题目例题解析(九)Unique Paths题目描述: A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in t原创 2017-11-07 12:55:24 · 306 阅读 · 0 评论 -
leetcode题目例题解析(八)
leetcode题目例题解析(八)Minimum Path Sum题目描述: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: Y原创 2017-11-07 11:59:21 · 227 阅读 · 0 评论 -
leetcode题目例题解析(四)
leetcode题目例题解析(四)Remove Nth Node From End of List题目描述: 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原创 2017-09-22 00:22:26 · 298 阅读 · 0 评论 -
leetcode题目例题解析(三)
leetcode题目例题解析(三)Search for a Range题目描述: Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity原创 2017-09-21 23:51:32 · 294 阅读 · 0 评论 -
leetcode题目例题解析
leetcode题目例题解析(一)Add Two Numbers题目描述: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single原创 2017-09-08 13:27:19 · 418 阅读 · 0 评论 -
leetcode题目例题解析(十五)
leetcode题目例题解析(十五)Sort Colors题目描述: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue原创 2017-12-30 00:52:53 · 287 阅读 · 0 评论