题目描述 The cows are being invaded! Their republic comprises N (1 <= N <= 50,000) towns that are connected by M (1 <= M <= 100,000) undirected paths betw ...
分类:
其他好文 时间:
2020-03-24 09:16:45
阅读次数:
78
不同路径II。题意跟版本一一样,唯一的不同点在于路径上会有障碍物。依然是返回到底有多少不同的路径能从左上角走到右下角。例子, Example 1: Input: [ [0,0,0], [0,1,0], [0,0,0] ] Output: 2 Explanation: There is one obs ...
分类:
其他好文 时间:
2020-03-23 12:40:29
阅读次数:
85
Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] ...
分类:
其他好文 时间:
2020-03-12 09:53:25
阅读次数:
54
暴露出一个微服务echo " apiVersion: extensions/v1beta1 kind: Ingress metadata: name: demo spec: rules: - http: paths: - path: /foo backend: serviceName: httpbi ...
分类:
其他好文 时间:
2020-03-07 11:26:02
阅读次数:
64
环境变量配置文件 MacOS Linux 如果shell的类型是zsh时,还会存在 和`~/.zshrc`。 其中 ,`/etc/paths /etc/bashrc /etc/profile /etc/paths /etc/bashrc`在bash shell执行时,会读取该文件。 MacOS默认用 ...
分类:
其他好文 时间:
2020-02-27 14:37:14
阅读次数:
73
You are given a square board of characters. You can move on the board starting at the bottom right square marked with the character 'S'. You need to r ...
分类:
其他好文 时间:
2020-02-22 13:33:15
阅读次数:
59
原题链接在这里:https://leetcode.com/problems/all-paths-from-source-to-target/ 题目: Given a directed, acyclic graph of N nodes. Find all possible paths from no ...
分类:
其他好文 时间:
2020-02-18 09:41:25
阅读次数:
63
一、题目说明 题目62. Unique Paths,在一个m n矩阵中,求从左上角Start到右下角Finish所有路径。其中每次只能向下、向右移动。难度是Medium! 二、我的解答 这个题目读读题目,理解后不难。定义一个 ,初始化最后一列为1,最后一行为1,然后循环计算到 就可以了。 代码如下: ...
分类:
其他好文 时间:
2020-02-18 09:36:51
阅读次数:
62
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 p ...
分类:
其他好文 时间:
2020-02-17 22:33:36
阅读次数:
99