![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
caijhBlog
目前是个大学生
展开
-
图算法
图算法1.关于拓扑序( 207. Course Schedule)a.题意 There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have to firs原创 2017-09-24 19:46:17 · 231 阅读 · 0 评论 -
Jump Game II
Jump Game IIA.题意 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at th原创 2018-01-13 10:22:07 · 151 阅读 · 0 评论 -
Monotone Increasing Digits
Monotone Increasing DigitsA.题意 Given a non-negative integer N, find the largest number that is less than or equal to N with monotone increasing digits. (Recall that an integer has monoton原创 2018-01-21 21:23:44 · 156 阅读 · 0 评论 -
Network Delay Time
Network Delay TimeA.题意 There are N network nodes, labelled 1 to N. Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v is the target原创 2018-01-21 21:35:26 · 220 阅读 · 0 评论 -
Find Bottom Left Tree Value
Find Bottom Left Tree ValueA.题意 Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Input: 2 / \ 1 3 Output: 1 Example 2:原创 2018-01-21 21:48:29 · 207 阅读 · 0 评论 -
Counting Bits
Counting BitsA.题意 Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an array.原创 2018-01-21 22:05:48 · 184 阅读 · 0 评论 -
Partition Equal Subset Sum
Partition Equal Subset SumA.题意 Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is原创 2018-01-21 22:21:03 · 207 阅读 · 0 评论 -
《算法概论》课后证明题作业
《算法概论》课后证明题作业题目 8.14给定一个无向图G =(V,E)和整数k,求G中一个规模为k的团以及一个规模为k的独立集。假定它们都是存在的。证明要求规模为k的团,意思就是求出G中k个顶点使得它们之间两两存在相连的边。为此我们先假设要求任意图中大小为k的团,可以在此图中添加k个顶点,顶点间相互独立,得到新图G’来开始我们的证明。 G’中k个独立的顶点形成大小为原创 2018-01-21 22:46:32 · 822 阅读 · 0 评论 -
Unique Paths
Unique PathsA.题意 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 time. The ro原创 2018-01-20 23:26:54 · 135 阅读 · 0 评论 -
Unique Paths II
Unique Paths IIA.题意 Follow up for “Unique Paths”: Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked a原创 2018-01-21 00:12:33 · 135 阅读 · 0 评论 -
Delete Operation for Two Strings
Delete Operation for Two Strings原创 2017-12-27 20:22:45 · 136 阅读 · 0 评论 -
Maximum Sum of 3 Non-Overlapping Subarrays
Maximum Sum of 3 Non-Overlapping Subarrays原创 2017-12-18 18:33:29 · 213 阅读 · 0 评论 -
week1
Median of Two Sorted Arrays (from leetCode)A.题意 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity原创 2017-09-10 13:00:50 · 332 阅读 · 0 评论 -
分治与动态规划之Burst Balloons问题
Burst BalloonsA.题意 Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst balloon i原创 2017-10-09 18:59:23 · 333 阅读 · 0 评论 -
LeetCode : Minimum Number of Arrows to Burst Balloons
Minimum Number of Arrows to Burst Balloons原创 2017-10-30 17:14:52 · 208 阅读 · 0 评论 -
回文子串(动态规划)
Longest Palindromic Substring原创 2017-10-09 15:25:11 · 441 阅读 · 0 评论 -
leetCode:Non-overlapping Intervals
Non-overlapping Intervals原创 2017-10-23 20:56:55 · 288 阅读 · 0 评论 -
Queue Reconstruction by Height
Queue Reconstruction by Height原创 2017-10-16 17:08:57 · 224 阅读 · 0 评论 -
Best Time to Buy and Sell Stock with Transaction Fee
leetcode : Best Time to Buy and Sell Stock with Transaction Fee原创 2017-12-04 16:18:20 · 221 阅读 · 0 评论 -
Decode Ways II
Decode Ways II原创 2017-12-25 15:41:22 · 215 阅读 · 0 评论 -
Target Sum
Target SumA.题意 Follow up for “Unique Paths”: You are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should ch原创 2018-01-21 00:29:03 · 159 阅读 · 0 评论