E. Maximum Matching time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output E. Maximum Matching ...
分类:
其他好文 时间:
2019-04-09 16:32:02
阅读次数:
101
题目: 1.binary tree preorder traversal 2.maximum depth of binary tree 3.balanced binary tree 4.binary tree maximum path sum 5.lowest common ancestor 6.b ...
分类:
其他好文 时间:
2019-04-06 19:05:08
阅读次数:
101
Given an array A of positive integers, A[i] represents the value of the i-th sightseeing spot, and two sightseeing spots i and j have distance j - i b ...
分类:
其他好文 时间:
2019-04-04 09:47:50
阅读次数:
176
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1, ...
分类:
Web程序 时间:
2019-04-02 18:37:15
阅读次数:
1276
Problem Description: Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. 题解: 这个题很容易想到复杂度为O(n^2)的暴力方法。 ...
分类:
其他好文 时间:
2019-03-29 17:27:16
阅读次数:
133
Use prefix product(sum? actually much the same). ...
分类:
其他好文 时间:
2019-03-28 23:23:06
阅读次数:
284
网址:https://leetcode.com/problems/maximum-subarray/submissions/ 很简单的动态规划 我们可以把 dp[i] 表示为index为 i 的位置上的Maximum 容易得出,dp[i] = max( nums[i] , dp[i-1] + num ...
分类:
其他好文 时间:
2019-03-28 19:29:23
阅读次数:
185
写类似朋友圈界面的时候有九宫格,2*2的图片展示,用的gridlayout,运行的时候会崩溃,报错如下 java.lang.IllegalArgumentException: columnCount must be greater than or equal to the maximum of al ...
分类:
其他好文 时间:
2019-03-25 14:55:35
阅读次数:
317
<编程题> 1、[Maximum Product Subarray 求最大子数组乘积] 这个求最大子数组乘积问题是由最大子数组之和问题演变而来,但是却比求最大子数组之和要复杂,因为在求和的时候,遇到0,不会改变最大值,遇到负数,也只是会减小最大值而已。而在求最大子数组乘积的问题中,遇到0会使整个乘积 ...
分类:
编程语言 时间:
2019-03-24 18:47:34
阅读次数:
159
概述 我们都知道 TCP 是 可靠的数据传输协议,UDP是不可靠传输,那么TCP它是怎么保证可靠传输的呢?那我们就不得不提 TCP 的三次握手和四次挥手。 三次握手 下图为三次握手的流程图 下面通过我们 wireshark 抓包工具来分析三次握手 三次握手数据包 第一次握手 建立连接。客户端发送连接 ...
分类:
其他好文 时间:
2019-03-23 19:47:33
阅读次数:
146