xinyu04

导航

2022年5月19日 #

LeetCode 120 Triangle DP

摘要: Given a triangle array, return the minimum path sum from top to bottom. For each step, you may move to an adjacent number of the row below. More forma 阅读全文

posted @ 2022-05-19 03:26 Blackzxy 阅读(9) 评论(0) 推荐(0) 编辑

2022年5月18日 #

LeetCode 207 Course Schedule 拓扑排序BFS

摘要: There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i 阅读全文

posted @ 2022-05-18 03:00 Blackzxy 阅读(18) 评论(0) 推荐(0) 编辑

2022年5月16日 #

LeetCode 130 Surrounded Regions 连通块DFS

摘要: Given an m x n matrix board containing 'X' and 'O', capture all regions that are 4-directionally surrounded by 'X'. A region is captured by flipping a 阅读全文

posted @ 2022-05-16 20:51 Blackzxy 阅读(28) 评论(0) 推荐(0) 编辑

LeetCode 129 Sum Root to Leaf Numbers DFS

摘要: You are given the root of a binary tree containing digits from 0 to 9 only. Each root-to-leaf path in the tree represents a number. For example, the r 阅读全文

posted @ 2022-05-16 19:13 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑

LeetCode 98 Validate Binary Search Tree DFS

摘要: Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: The left subtree of a node co 阅读全文

posted @ 2022-05-16 06:14 Blackzxy 阅读(12) 评论(0) 推荐(0) 编辑

Deep Learning Week6 Notes

摘要: 1. Benefits of depth \(\text{Consider ReLU MLPs with a single Input/Output, there exists a network }f\) \(\text{ with }D^* \text{ layers, and }2D^* \t 阅读全文

posted @ 2022-05-16 02:54 Blackzxy 阅读(23) 评论(0) 推荐(0) 编辑

LeetCode 104 Maximum Depth of Binary Tree DFS

摘要: Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path from the root n 阅读全文

posted @ 2022-05-16 01:31 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑

2022年5月15日 #

LeetCode 63 Unique Paths II DP

摘要: You are given an m x n integer array grid. There is a robot initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to th 阅读全文

posted @ 2022-05-15 23:26 Blackzxy 阅读(16) 评论(0) 推荐(0) 编辑

Leetcode 5 Longest Palindromic Substring DP

摘要: Given a string s, return the longest palindromic substring in s. Solution 设 \(dp[i][j]\) 表示字串 \(s[i,...,j]\) 是否为回文串。初始化时,每个单独的字符本身就是回文串;长度为2的串只要首尾相同,也 阅读全文

posted @ 2022-05-15 02:57 Blackzxy 阅读(7) 评论(0) 推荐(0) 编辑

Leetcode 322 Coin Change DP

摘要: You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return 阅读全文

posted @ 2022-05-15 01:20 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑