My code: public class Solution { public boolean increasingTriplet(int[] nums) { int min = Integer.MAX_VALUE, s…
分类:LeetCode
LeetCode 202 Happy Number
题目描述 Write an algorithm to determine if a number is “happy”. A happy number is a number defined by the followi…
1002. Find Common Characters
Given an array A of strings made only from lowercase letters, return a list of all characters that show up in …
LeetCode | Triangle(三角形路径和)
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on …
LeetCode 595. Big Countries
LeetCode 595. Big Countries 题目 There is a table World +-----------------+------------+------------+-----------…
二刷277. Find the Celebrity
Medium 思路比较特别,扫两遍。第一遍选出满足条件的,第二遍验证是不是真的完全满足条件。 第一遍选出来的candidate前面的都不可能是candidate, 因为他们都knows somebody;而candida…
[LeetCode By Go 35]Add to List 171. Excel Sheet Column Number
题目 Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its c…
[LeetCode] Longest Substring with At Least K Repeating Characters 至少有K个重复字符的最长子字符串
Find the length of the longest substring T of a given string (consists of lowercase letters only) such …
[LeetCode] Falling Squares 下落的方块
On an infinite number line (x-axis), we drop given squares in the order they are given. The i-th s…
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…
[LeetCode] Next Greater Element II 下一个较大的元素之二
Given a circular array (the next element of the last element is the first element of the array), print …