155. Minimum Depth of Binary Tree Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from t ...
分类:
其他好文 时间:
2019-04-09 12:36:45
阅读次数:
139
``` class Solution { public: int minPathSum(vector &grid) { int m = grid.size(), n = grid[0].size(); int dp[m][n]; dp[0][0] = grid[0][0]; for (int i = ...
分类:
其他好文 时间:
2019-04-09 11:05:24
阅读次数:
106
http://poj.org/problem?id=3041 Description Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 ...
分类:
其他好文 时间:
2019-04-08 13:27:21
阅读次数:
131
Assignment 6CSCI 2132: Software DevelopmentDue April 1, 2019Assignments are due on the due date before 23:59. All assignments must be submitted electr ...
分类:
其他好文 时间:
2019-04-07 19:16:12
阅读次数:
117
Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations permitt ...
分类:
其他好文 时间:
2019-04-06 15:34:06
阅读次数:
117
<!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
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo ...
分类:
其他好文 时间:
2019-04-02 16:51:36
阅读次数:
145
Last login: Sat Mar 30 07:38:24 2019 from 10.0.0.3[root@vmhzpcentosdisk ~]# fdisk -l 在esxi上给虚拟机新增磁盘,后重启虚拟机; Disk /dev/sda: 1075 MB, 1075838976 bytes, ...
分类:
其他好文 时间:
2019-03-30 10:27:39
阅读次数:
155
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov ...
分类:
其他好文 时间:
2019-03-28 09:29:42
阅读次数:
142
不是很难的模拟题,想好前后状态的变化就会发现,其实“)”括号才可以抵消之前的“(”括号,反之不行。class Solution(object): def minAddToMakeValid(self, S): """ :type S: str :rtype: int """ l, r = 0, 0 ... ...
分类:
其他好文 时间:
2019-03-27 09:20:33
阅读次数:
136