int maxSize = -1; string ss = "hello,world."; if(maxSize < ss.size()) cout << "ss.size()" << en…
标签:LeetCode
Leetcode - Increasing Triplet Subsequence
My code: public class Solution { public boolean increasingTriplet(int[] nums) { int min = Integer.MAX_VALUE, s…
LeetCode 595. Big Countries
LeetCode 595. Big Countries 题目 There is a table World +-----------------+------------+------------+-----------…
二刷277. Find the Celebrity
Medium 思路比较特别,扫两遍。第一遍选出满足条件的,第二遍验证是不是真的完全满足条件。 第一遍选出来的candidate前面的都不可能是candidate, 因为他们都knows somebody;而candida…
Leetcode LinkedList题型总结(1)
LinkedList 的操作. 加入 删除 翻转 这是三个最常考的类型. 先来讲翻转 还是经典题, Revert Linked List 然后通过这一题可以延伸出很多种不同的翻转. 在Linked List 中最常要考虑…
261. Graph Valid Tree
Medium Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), wr…
110.Balanced Binary Tree
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is de…
361. Bomb Enemy解题报告
Description: Given a 2D grid, each cell is either a wall ‘W’, an enemy ‘E’ or empty …
728. Self Dividing Numbers
题目地址:https://leetcode.com/problems/self-dividing-numbers/description/ 大意:判断一个数字各个位上不含数字0,且每个位上的数字都能被这个数字整除,返回给…
Jump Game解题报告
Description: Given an array of non-negative integers, you are initially positioned at the first index of the a…
Leetcode2——Add Two Numbers
文章作者:Tyan 博客:noahsnail.com | CSDN | 简书 1. 问题描述 You are given two non-empty linked list…
LeetCode算法题-Reverse Bits(Java实现)
这是悦乐书的第185次更新,第187篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第44题(顺位题号是190)。给定32位无符号整数,求它的反转位。例如: 输入:43261596 输出:96…