首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏calmound

    Minimum Path Sum

    问题:从左上角到右下角的最小路径和 class Solution { public: int num[300][300]; int dfs(int x,int y,vector<vector<int> >&grid) { if(x==grid.size()-1 && y==grid[0].size()-1) return grid[x][y]; if(num[x][y]) return num[x][y]; int h1=99999,h

    75240发布于 2018-04-17
  • 来自专栏计算机视觉理论及其实现

    numpy.minimum

    numpy.minimum numpy.minimum(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype =None, subok=True[, signature, extobj]) = <ufunc 'minimum'> Element-wise minimum of array elements. The minimum value of an array along a given axis, ignores NaNs. fmax, amax, nanmax Notes The minimum Examples >>> np.minimum([2, 3, 4], [1, 5, 2]) array([1, 3, 2]) >>> np.minimum(np.eye(2), [0.5, 2]) , np.nan]) array([nan, nan, nan]) >>> np.minimum(-np.Inf, 1) -inf

    28110编辑于 2022-08-20
  • 来自专栏蛮三刀的后端开发专栏

    Minimum Path Sum

    从一个矩阵的左上角出发到右下角,只能向右或向下走,找出哪一条路径上的数字之和最小。

    86120发布于 2019-03-26
  • 来自专栏给永远比拿愉快

    Minimum Cost For Tickets

    Minimum Cost For Tickets 题目描述 LeetCode地址:983. Minimum Cost For Tickets In a country popular for train travel, you have planned some train travelling Return the minimum number of dollars you need to travel every day in the given list of days. days数组中存储的是该年中去旅游的日期

    66340发布于 2019-02-05
  • 来自专栏给永远比拿愉快

    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.

    46720发布于 2019-01-22
  • 来自专栏给永远比拿愉快

    Minimum Falling Path Sum

    Minimum Falling Path Sum 题目描述 本题目链接:931. Minimum Falling Path Sum Given a square array of integers A, we want the minimum sum of a falling paththrough

    49430发布于 2019-02-05
  • 来自专栏calmound

    Minimum Depth of Binary Tree

    题意:二叉树的最小深度 注意   1.当root为空的时候直接返回0,因为MIN赋值很大,所以如果不单独预判的话会返回MIN         2.判断树的深度应该到叶子节点,也就是左右子结点都为空的那个结点         3.树的深度的根节点深度为1 class Solution { public: void dfs(TreeNode *root,int &MIN,int step) { if(root==NULL) return ; if(root->

    69770发布于 2018-04-17
  • 来自专栏蛮三刀的后端开发专栏

    Minimum Depth of Binary Tree

    这题有意思的是,并不能直接将求最大深度的max改为min就完了,有很多坑在里面。一开始我以为只要将[],[0],[1,2]等情况考虑掉就可以了,其实在只有一边又子节点的情况下,是仍然需要遍历的。 例如:

    45420发布于 2019-03-26
  • 来自专栏freesan44

    binarysearch Minimum Light Radius

    You are given a list of integers nums representing coordinates of houses on a 1-dimensional line. You have 3 street lights that you can put anywhere on the coordinate line and a light at coordinate x lights up houses in x - r, x + r, inclusive. Return the smallest r required such that we can place the 3 lights and all the houses are lit up.

    83730发布于 2021-10-19
  • 来自专栏计算机视觉与深度学习基础

    Leetcode 76 Minimum Window Substring

    Given a string S and a string T, find the minimum window in S which will contain all the characters For example, S = "ADOBECODEBANC" T = "ABC" Minimum window is "BANC". If there are multiple such windows, you are guaranteed that there will always be only one unique minimum

    70780发布于 2018-01-12
  • 来自专栏Reck Zhang

    LeetCode 0064 - Minimum Path Sum

    Minimum Path Sum Desicription Given a m x n grid filled with non-negative numbers, find a path from top

    28830发布于 2021-08-11
  • 来自专栏给永远比拿愉快

    Leetcode: 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 the root node down to the nearest

    44740发布于 2019-01-22
  • 来自专栏计算机视觉与深度学习基础

    Leetcode 64 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: You can only move either down or right at any point in time. 和62,63如出一辙的套路,没什么含量 class Solution

    65670发布于 2018-01-12
  • 来自专栏尾尾部落

    Minimum Depth of Binary Tree

    链接:https://leetcode.com/problems/minimum-depth-of-binary-tree/description/ 难度:Easy 题目:111. 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 the root node down to the nearest ), minDepth(root.right)); } } 上一篇 下一篇 版权属于: 尾尾部落 原文地址: https://weiweiblog.cn/minimum-depth-of-binary-tree

    58160发布于 2018-09-04
  • 来自专栏Reck Zhang

    LeetCode 0076 - Minimum Window Substring

    Minimum Window Substring Desicription Given a string S and a string T, find the minimum window in S which For example, S = "ADOBECODEBANC" T = "ABC" Minimum window is "BANC". If there are multiple such windows, you are guaranteed that there will always be only one unique minimum

    51240发布于 2021-08-11
  • 来自专栏全栈程序员必看

    Minimum Fleet Problem「建议收藏」

    本文为MIT Senseable City Laboratory 2018年5月23号发表于Nature杂志Addressing the minimum fleet problem in on-demand 问题定义 给定一批出行需求,在出行需求被严格满足且最大空驶时间不超过δ分钟约束下,找到最小车队数 解决方案 总体思路:minimum fleet -> path cover -> maximum cardinality 的出发时刻 (保证用户实际需求不用等待) 节点j的出发时刻 – 节点i的预计送达时刻 <= 时间阈值(文章设置为15min,即车辆最大空驶时间为15min,保证车辆调度效率) 按照上述方式搭建的网络,minimum

    72720编辑于 2022-09-05
  • 来自专栏全栈程序员必看

    Minimum Size Subarray Sum — leetcode

    Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn’t one, return 0 instead.

    62530编辑于 2022-07-10
  • 来自专栏来自地球男人的部落格

    Minimum Path Sum

    Minimum Path Sum是LeetCode网站上的一个题目,题目描述为给定一个m x n的二维整数数组grid,从左上角到右下角的最小路径和是多少?路径只能向右或向下移动。

    57070发布于 2018-01-03
  • 来自专栏dylanliu

    Minimum Window Substring

    Description tags: Hash Table, Two Pointers, String difficulty: Hard Given a string S and a string T, find the minimum If there is such window, you are guaranteed that there will always be only one unique minimum window

    56220发布于 2019-07-01
  • 来自专栏Reck Zhang

    LeetCode 0310 - Minimum Height Trees

    Minimum Height Trees Desicription For an undirected graph with tree characteristics, we can choose any Among all possible rooted trees, those with minimum height are called minimum height trees (MHTs).

    51530发布于 2021-08-11
领券