xinyu04

导航

2022年5月6日 #

LeetCode 113 Path Sum II DFS

摘要: Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths where the sum of the node values in the path equals targetSum. 阅读全文

posted @ 2022-05-06 03:20 Blackzxy 阅读(10) 评论(0) 推荐(0) 编辑

2022年5月5日 #

Deep Learning Week3 Notes

摘要: 1. Perceptron \(\text{If }\sum_iw_ix_i+b\ge 0\) \[ \begin{align} f(x)=1 \end{align} \] \(\text{Otherwise, } f(x)=0\) \(\large \textbf{Perceptron Algor 阅读全文

posted @ 2022-05-05 04:36 Blackzxy 阅读(17) 评论(0) 推荐(0) 编辑

2022年5月3日 #

LibreOJ 131 树状数组2:区间修改,单点查询

摘要: 题目地址 Solution 前面已经知道了树状数组的单点修改和区间查询。这里利用差分的思想:具体来说,维护 \(b\) 数组: \[ b[i] = a[i]-a[i-1] \] 其中 \(a\) 为原来数组。可以发现 \[ a[i] = \sum_{k=1}^ib[k] \] 因此我们只需要对 \( 阅读全文

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

2022年5月2日 #

机器学习中的优化 Optimization Chapter 3 Projected Gradient Descent(1)

摘要: 1. Projected Gradient Descent \[ \begin{align} y_{t+1} &= x_t-\gamma \nabla f(x_t)\\ x_{t+1} &= \prod_X(y_{t+1}) = \arg\min_{x}||x-y_{t+1}||^2 \end{al 阅读全文

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

2022年5月1日 #

LeetCode 62 Unique Paths DP

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

posted @ 2022-05-01 22:37 Blackzxy 阅读(51) 评论(0) 推荐(0) 编辑

LeetCode 179 Largest Number 贪心

摘要: Given a list of non-negative integers nums, arrange them such that they form the largest number and return it. Since the result may be very large, so 阅读全文

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

LeetCode 55 Jump Game 贪心

摘要: You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum ju 阅读全文

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

LeetCode 45 Jump Game II 区间DP

摘要: Given an array of non-negative integers nums, you are initially positioned at the first index of the array. Each element in the array represents your 阅读全文

posted @ 2022-05-01 02:36 Blackzxy 阅读(19) 评论(0) 推荐(0) 编辑

2022年4月30日 #

Deep Learning Week2 Notes

摘要: Loss and Risk 1. Classification & Regression \(\text{I. Classification(e.g. }{\bf{Objection\ recognition, cancer\ detection, speech\ processing...}})\ 阅读全文

posted @ 2022-04-30 16:26 Blackzxy 阅读(18) 评论(0) 推荐(0) 编辑

2022年4月29日 #

机器学习中的优化 Optimization Chapter 2 Gradient Descent(2)

摘要: \(\large \bf{Theorem }\ 2.7:\) \(f:\mathbb{R^d}\rightarrow\mathbb{R}\text{ be convex and differentiable with a global minimum }x^*;\text{ Suppose }f\t 阅读全文

posted @ 2022-04-29 02:54 Blackzxy 阅读(30) 评论(0) 推荐(0) 编辑