非商业,LeetCode链接附上: https://leetcode-cn.com/problems/longest-increasing-subsequence/ 进入正题。 题目: 给定一个无序的整数数组,找到其中最长上升子序列的长度。 示例: 输入: [10,9,2,5,3,7,101,18] ...
分类:
其他好文 时间:
2020-12-10 10:49:44
阅读次数:
2
非商业,LeetCode链接附上: https://leetcode-cn.com/problems/er-cha-sou-suo-shu-de-di-kda-jie-dian-lcof/ 进入正题。 题目: 给定一棵二叉搜索树,请找出其中第k大的节点。 示例: 示例 1: 输入: root = [ ...
分类:
其他好文 时间:
2020-12-07 12:37:30
阅读次数:
6
Description: Given a singly linked list, determine if it is a palindrome. Link: https://leetcode.com/problems/palindrome-linked-list/ Examples: Exampl ...
分类:
其他好文 时间:
2020-12-05 11:02:42
阅读次数:
7
package LeetCode_771 /** * 771. Jewels and Stones * https://leetcode.com/problems/jewels-and-stones/ * You're given strings J representing the types o ...
分类:
其他好文 时间:
2020-12-05 10:48:43
阅读次数:
7
题目:https://leetcode-cn.com/problems/ju-zhen-zhong-de-lu-jing-lcof/submissions/ 代码: class Solution { public boolean exist(char[][] board, String word) ...
分类:
其他好文 时间:
2020-12-03 12:21:11
阅读次数:
6
给定一个二叉树,判断它是否是高度平衡的二叉树。 本题中,一棵高度平衡二叉树定义为: 一个二叉树每个节点 的左右两个子树的高度差的绝对值不超过 1 。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/balanced-binary-tree 著作 ...
分类:
其他好文 时间:
2020-12-03 11:59:09
阅读次数:
6
此博客连接:https://www.cnblogs.com/ping2yingshi/p/14054440.html 存在重复元素2 题目链接:https://leetcode-cn.com/problems/contains-duplicate-ii/submissions/ 题目 给定一个整数数 ...
分类:
其他好文 时间:
2020-12-03 11:48:40
阅读次数:
2
题目链接:https://leetcode-cn.com/problems/reverse-pairs/ 题意:给你一个数组,求满足i<j且nums[i]>2*num[j]的(i,j)对的数量 分析:本质上,就是对数组中的每一个元素,统计位于它左侧或右侧,且取值位于某个区间内的值的数量,和leetc ...
分类:
其他好文 时间:
2020-12-03 11:35:19
阅读次数:
4
Difficulty: Medium Related Topics: Depth-first Search, Breadth-first Search, Graph, Topological Sort Link: https://leetcode.com/problems/course-schedu ...
分类:
其他好文 时间:
2020-12-02 12:03:00
阅读次数:
4
非商业,LeetCode链接附上: https://leetcode-cn.com/problems/uncommon-words-from-two-sentences/ 进入正题。 题目: 给定两个句子 A 和 B 。 (句子是一串由空格分隔的单词。每个单词仅由小写字母组成。) 如果一个单词在其中 ...
分类:
其他好文 时间:
2020-12-02 12:01:10
阅读次数:
3