Hot

20天 hot 100 速通计划-day16

### 堆 #### [295. 数据流的中位数](https://leetcode.cn/problems/find-median-from-data-stream/) **中位数**是有序整数列表中的中间值。如果列表的大小是偶数,则没有中间值,中位数是两个中间值的平均值。 - 例如 `arr = ......
hot 100 day 16

20天 hot 100 速通计划-day15

### 栈 #### [394. 字符串解码](https://leetcode.cn/problems/decode-string/) 给定一个经过编码的字符串,返回它解码后的字符串。 编码规则为: `k[encoded_string]`,表示其中方括号内部的 `encoded_string` 正 ......
hot 100 day 15

20天 hot 100 速通计划-day14

### 二分查找 #### [33. 搜索旋转排序数组](https://leetcode.cn/problems/search-in-rotated-sorted-array/) 整数数组 `nums` 按升序排列,数组中的值 **互不相同** 。 在传递给函数之前,`nums` 在预先未知的某个 ......
hot 100 day 14

20天 hot 100 速通计划-day13

### 回溯 #### [131. 分割回文串](https://leetcode.cn/problems/palindrome-partitioning/) 给你一个字符串 `s`,请你将 `s` 分割成一些子串,使每个子串都是 **回文串** 。返回 `s` 所有可能的分割方案。 **回文串** ......
hot 100 day 13

学习笔记411—【词向量基础】:one-hot

【词向量基础】:one-hot 词向量(word vector),也叫词嵌入(word embedding),是一种词表征形式,将词从符号形式映射为向量形式,渐渐演变成了一种知识表示的方法。将词语从符号表示形式转换为了向量表示形式,方便了机器对自然语言的计算,因此,词向量几乎成为了所有自然语言处理和 ......
向量 one-hot 基础 笔记 411

20天 hot 100 速通计划-day12

### 回溯 #### [78. 子集](https://leetcode.cn/problems/subsets/) 给你一个整数数组 `nums` ,数组中的元素 **互不相同** 。返回该数组所有可能的子集(幂集)。 解集 **不能** 包含重复的子集。你可以按 **任意顺序** 返回解集。 ......
hot 100 day 12

20天 hot 100 速通计划-day11

### 图论 #### [200. 岛屿数量](https://leetcode.cn/problems/number-of-islands/) 给你一个由 `'1'`(陆地)和 `'0'`(水)组成的的二维网格,请你计算网格中岛屿的数量。 岛屿总是被水包围,并且每座岛屿只能由水平方向和/或竖直方向 ......
hot 100 day 11

20天 hot 100 速通计划-day10

### 二叉树 #### [114. 二叉树展开为链表](https://leetcode.cn/problems/flatten-binary-tree-to-linked-list/) 给你二叉树的根结点 `root` ,请你将它展开为一个单链表: - 展开后的单链表应该同样使用 `TreeNo ......
hot 100 day 10

20天 hot 100 速通计划-day09

### 二叉树 #### [102. 二叉树的层序遍历](https://leetcode.cn/problems/binary-tree-level-order-traversal/) 给你二叉树的根节点 `root` ,返回其节点值的 **层序遍历** 。 (即逐层地,从左到右访问所有节点)。 ......
hot 100 day 09

20天 hot 100 速通计划-day08

### 二叉树 #### [94. 二叉树的中序遍历](https://leetcode.cn/problems/binary-tree-inorder-traversal/) 给定一个二叉树的根节点 `root` ,返回 *它的 **中序** 遍历* 。 **示例 1:** ![img](http ......
hot 100 day 08

20天 hot 100 速通计划-day07

### 链表 #### [25. K 个一组翻转链表](https://leetcode.cn/problems/reverse-nodes-in-k-group/) 给你链表的头节点 `head` ,每 `k` 个节点一组进行翻转,请你返回修改后的链表。 `k` 是一个正整数,它的值小于或等于链表 ......
hot 100 day 07

20天 hot 100 速通计划-day06

### 链表 #### [142. 环形链表 II](https://leetcode.cn/problems/linked-list-cycle-ii/) 给定一个链表的头节点 `head` ,返回链表开始入环的第一个节点。 *如果链表无环,则返回 `null`。* 如果链表中有某个节点,可以通过 ......
hot 100 day 06

使用golang解决LeetCode热题Hot100(1-10)

# 使用golang解决LeetCode热题Hot100 ## 1.两数之和 ### https://leetcode.cn/problems/two-sum/ #### 题目 给定一个整数数组 `nums` 和一个整数目标值 `target`,请你在该数组中找出 **和为目标值** *`targe ......
LeetCode golang Hot 100 10

20天 hot 100 速通计划-day05

### 矩阵 #### [240. 搜索二维矩阵 II](https://leetcode.cn/problems/search-a-2d-matrix-ii/) 编写一个高效的算法来搜索 `*m* x *n*` 矩阵 `matrix` 中的一个目标值 `target` 。该矩阵具有以下特性: - ......
hot 100 day 05

20天 hot 100 速通计划-day04

### 普通数组 #### [238. 除自身以外数组的乘积](https://leetcode.cn/problems/product-of-array-except-self/) 给你一个整数数组 `nums`,返回 *数组 `answer` ,其中 `answer[i]` 等于 `nums` ......
hot 100 day 04

20天 hot 100 速通计划-day03

### 子串 #### [239. 滑动窗口最大值](https://leetcode.cn/problems/sliding-window-maximum/) 给你一个整数数组 `nums`,有一个大小为 `k` 的滑动窗口从数组的最左侧移动到数组的最右侧。你只可以看到在滑动窗口内的 `k` 个数 ......
hot 100 day 03

20天 hot 100 速通计划-day02

### 双指针 #### [15. 三数之和](https://leetcode.cn/problems/3sum/) 给你一个整数数组 `nums` ,判断是否存在三元组 `[nums[i], nums[j], nums[k]]` 满足 `i != j`、`i != k` 且 `j != k` , ......
hot 100 day 02

20天 hot 100 速通计划-day01

### 哈希 #### [1. 两数之和](https://leetcode.cn/problems/two-sum/) 给定一个整数数组 `nums` 和一个整数目标值 `target`,请你在该数组中找出 **和为目标值** *`target`* 的那 **两个** 整数,并返回它们的数组下标。 ......
hot 100 day 01

题解 BZOJ4543【[POI2014] HOT-Hotels】

长链剖分优化 DP 板子题了,但是虽然是板子这个转移方程也很难想。 ## problem 树。求 $\sum_{1\leq i 点击查看代码 Rename $height,len\to hei$,$g\to h$。 ``` #include #include #include #include us ......
题解 HOT-Hotels Hotels BZOJ 4543

Python【18】 pytorch中的one_hot() (独热编码函数)

参考:https://pytorch.org/docs/stable/generated/torch.nn.functional.one_hot.html ![image](https://img2023.cnblogs.com/blog/3240132/202307/3240132-2023072 ......
函数 编码 pytorch one_hot Python

Impact of SBS/HVA/CRM Modified Asphalt on the Moisture Stability of Recycled Hot-mix Asphalt Mixtures

SBS/HVA/CRM改性沥青对再生沥青混合料水稳定性的影响 Impact of SBS/HVA/CRM Modified Asphalt on the Moisture Stability of Recycled Hot-mix Asphalt Mixtures 武汉工程大学 土木工程与建筑学院 ......
Asphalt Stability Modified Mixtures Moisture

上班摸鱼刷算法-Java-hot100-[206]反转链表

class Solution { public ListNode reverseList(ListNode head) { if (head == null || head.next == null) { return head; } ListNode preNode = null; ListNod ......
算法 Java-hot Java 100 206

上班摸鱼刷算法-Java-hot100-[141]环形链表

//快慢指针public class Solution { public boolean hasCycle(ListNode head) { if (head == null || head.next == null) { return false; } ListNode fastNode = he ......
环形 算法 Java-hot Java 100

上班摸鱼刷算法-Java-hot100-[160]相交链表

public class Solution { public ListNode getIntersectionNode(ListNode headA, ListNode headB) { if (headA == null || headB == null) { return null; } Lis ......
算法 Java-hot Java 100 160

上班摸鱼刷算法-Java-hot100-[21]合并两个有序链表

//将一个链表插入到另一个链表中class Solution { public ListNode mergeTwoLists(ListNode list1, ListNode list2) { if (list1 == null) { return list2; } if (list2 == nul ......
算法 Java-hot 两个 Java 100

golang: 模仿 VictoriaMetrics 中的做法,通过把局部变量放在自定义 Context 对象中来做到hot path 的 0 alloc

**作者:张富春(ahfuzhang),转载时请注明作者和引用链接,谢谢!** * [cnblogs博客](https://www.cnblogs.com/ahfuzhang/) * [zhihu](https://www.zhihu.com/people/ahfuzhang/posts) * [G ......
VictoriaMetrics 变量 局部 做法 对象

HOT100(除去前面做过的题)

最长回文子串 题目 中等 和最长回文子序列类似 自己的做法: class Solution { public String longestPalindrome(String s) { int len = s.length(); int max = 1; int left = 0, right = 0 ......
HOT 100

Leetcode Hot 100 & 239. Sliding Window Maximum

参考资料: Python文档heapq部分 考点:子串 & [题干] 1 Input: nums = [1,3,-1,-3,5,3,6,7], k = 3 2 Output: [3,3,5,5,6,7] 3 Explanation: 4 Window position Max 5 6 [1 3 -1 ......
Leetcode Sliding Maximum Window Hot

Leetcode Hot 100 & 560. Subarray Sum Equals K

参考资料: 考点:子串 & [题干] 1 Input: nums = [1,1,1], k = 2 2 Output: 2 这道题说实话看得我一脸懵,第一时间想到的自然是双层循环遍历的一个$O(n^2)$的解法,也就是官方的解法一。但是使用这种解法会超时(Python语言是这样的,评论区有人提到了) ......
Leetcode Subarray Equals Hot 100

Leetcode Hot 100 & 128. Longest Consecutive Sequence

参考资料: 考点:哈希 & [题干] Input: nums = [100,4,200,1,3,2] Output: 4 Explanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its len ......
Consecutive Leetcode Sequence Longest Hot