Given a sequence of n integers a1, a2, …, an, a 132 pattern is a subsequence ai, aj, ak such…
分类:LeetCode
150. Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each…
[Leetcode] H-Index H指数
H-Index I Given an array of citations (each citation is a non-negative integer) of a researcher, write a funct…
【leetcode】76. Minimum Window Substring 最小字符包含给定字符串的子串
1. 题目 Given a string S and a string T, find the minimum window in S which will contain all the characters in T…
048 Rotate Image[M]
1 题目描述 You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Not…
机器人的运动范围
题目描述 地上有一个m行和n列的方格。一个机器人从坐标0,0的格子开始移动,每一次只能向左,右,上,下四个方向移动一格,但是不能进入行坐标和列坐标的数位之和大于k的格子。 例如,当k为18时,机器人能够进入方格(35,3…
Number of Boomerangs
欢迎关注本人博客:云端筑梦师 题目: Given n points in the plane that are all pairwise distinct, a “boomerang” is a …
LeetCode算法题-Binary Search(Java实现)
这是悦乐书的第297次更新,第316篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第165题(顺位题号是704)。给定n个元素的排序(按升序)整数数组nums和目标值,编写一个函数来搜索nu…
32. Longest Valid Parentheses
32. Longest Valid Parentheses 题目 Given a string containing just the characters '(' and ')', find the length of…
14. Longest Common Prefix
14. Longest Common Prefix 题目 Write a function to find the longest common prefix string amongst an array of str…
148. Sort List
欢迎fork and star:Nowcoder-Repository-github 148. Sort List 题目 Sort a linked list in O(n log n) time using const…
[LeetCode] Sliding Window Maximum 滑动窗口最大值
Given an array nums, there is a sliding window of size k which is moving from the very l…