- 博客(13)
- 收藏
- 关注
原创 Two Pointer
Two Pointer141. Linked List Cycle判断链表是否有环Can you solve it using O(1) (i.e. constant) memory?leetcode 141. Linked List Cycleclass Solution {public: bool hasCycle(ListNode *head) { ListNode *fa...
2020-05-05 16:32:23
356
原创 leetcode 1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to LimitGiven an array of integers nums and an integer limit, return the size of the longest continuous subarray such that the ...
2020-05-03 13:38:30
387
原创 leetdode 30 days Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary TreeGiven a binary tree where each path going from the root to any leaf form a valid sequence, check if a given string is a ...
2020-04-30 20:07:54
394
原创 LeetCode First Unique Number
First Unique NumberYou have a queue of integers, you need to retrieve the first unique integer in the queue.Implement the FirstUnique class:FirstUnique(int[] nums) Initializes the object with the n...
2020-04-28 22:11:20
333
原创 letcode1143 Longest Common Subsequence
letcode1143 Longest Common SubsequenceLongest Common SubsequenceGiven two strings text1 and text2, return the length of their longest common subsequence.A subsequence of a string is a new string ge...
2020-04-26 16:08:16
111
原创 Leetcode 560 Subarry Sum Equals K
Leetcode 560 Subarry Sum Equals KGiven an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k.Example 1:Input:nums = [1,1,1], k = 2O...
2020-04-22 18:42:06
156
原创 leetcode Leftmost Column with at Least a One
leetcode Leftmost Column with at Least a One(This problem is an interactive problem.)A binary matrix means that all elements are 0 or 1. For each individual row of the matrix, this row is sorted in ...
2020-04-21 17:14:40
513
原创 Leetcode 1254. Number of Closed Islands
Leetcode 1254. Number of Closed IslandsGiven a 2D grid consists of 0s (land) and 1s (water). An island is a maximal 4-directionally connected group of 0s and a closed island is an island totally (al...
2020-04-17 21:28:07
358
原创 Leetcode 200. Number of Islands
Leetcode 200. Number of IslandsGiven a 2d grid map of '1’s (land) and '0’s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontal...
2020-04-17 20:55:56
128
原创 leetcode 703. Kth Largest Element in a Stream & c++ priority_queue & minHeap/maxHeap
703. Kth Largest Element in a Stream & c++ priority_queue & minHeap/maxHeap相关链接leetcodec++ priority_queue cplusplusc++ priority_queue cnblog背景知识 堆是算法中常用的数据结构之一,其结构是完全二叉树,但实现的方法最常见的是使用数组...
2020-04-01 09:50:16
214
原创 ThinkPadE570无法正常关机问题
这里写自定义目录标题如果你在驱动位装了新的硬盘,很有可能是接口不兼容的问题,你可以找一下硬盘支架上面有没有开关按钮之类的,调到另一个位置就好了!!!!!!如果你在驱动位装了新的硬盘,很有可能是接口不兼容的问题,你可以找一下硬盘支架上面有没有开关按钮之类的,调到另一个位置就好了!!!!!!...
2020-03-25 18:48:04
574
原创 [leetcode]1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree
[leetcode]1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree链接leetcode描述 Given two binary trees original and cloned and given a reference to a node target in the original tr...
2020-03-25 18:41:10
649
原创 leetcode96. Unique Binary Search Trees
96. Unique Binary Search Trees相关链接leetcode卡特兰数描述 Given n, how many structurally unique BST’s (binary search trees) that store values 1 … n?例子:Input: 3Output: 5Explanation:Given n = 3, there...
2020-03-22 23:06:10
118
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人