-
You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a separate doubly linked list. These child lists…
-
Given a file and assume that you can only read the file using a given method `read4`, implement a method `read` to read _n_ characters. Your method `read` may be called multiple times.
Method…
-
学习笔记
## 第二周学习总结
### hashmap源码分析
经典哈希表结构. 数组+单链表.
jdk的优化是 为了解决链表太长导致查询退化的情况. 当链表长度超过阈值的时候, 进入红黑树
#### 为什么数组桶的长度要是2的次幂
因为哈希表的性能由两个地方决定. 1. hash函数的执行效率. 2.哈希函数是否均匀(减少冲突)
1. 为了提高哈希函数的执…
-
Given an array which consists of non-negative integers and an integer _m_ , you can split the array into _m_ non-empty continuous subarrays. Write an algorithm to minimize the largest sum among …
-
This question is about implementing a basic elimination algorithm for Candy Crush.
Given a 2D integer array `board` representing the grid of candy, different positive integers `board[i][j]` repres…
-
### LeetCode Username
santanupal
### Problem Number, Title, and Link
209. Minimum Size Subarray Sum https://leetcode.com/problems/minimum-size-subarray-sum/description
### Bug Category
Incorrect …
-
### LeetCode Username
gabrielpongelupe
### Problem Number, Title, and Link
4. Median of Two Sorted Arrays https://leetcode.com/problems/median-of-two-sorted-arrays/
### Bug Category
Problem descr…
-
给你两个有序整数数组 `nums1` 和 `nums2`,请你将 `nums2` 合并到 `nums1` 中,使 `num1` 成为一个有序数组。
说明:
初始化 `nums1` 和 `nums2` 的元素数量分别为 `m` 和 `n` 。
你可以假设 `nums1` 有足够的空间(空间大小大于或等于 `m + n` )来保存 `nums2` 中的元素。
**示例:**
…
-
### LeetCode Username
emad-ansari
### Problem Number, Title, and Link
264 Ugly Number II https://leetcode.com/problems/ugly-number-ii/description/
### Bug Category
Incorrect test case *(Output of…
-
### LeetCode Username
hyogil
### Problem Number, Title, and Link
1894. Find the Student that Will Replace the chalk https://leetcode.com/problems/find-the-student-that-will-replace-the-chalk/
### …