题目: Given an array of non-negative integers, you are initially positioned at the first index of the array. Eac…
分类:LeetCode
找出字符串里所有的anagrams
欢迎关注本人博客:云端筑梦师 题目: Given a string s and a nonempty string p, find all the start indices of p’s anagrams …
算法(3)简单四则运算
1.0 问题描述 实现10以内四则运算(只包含数字,+-*/和小括号) 2.0 问题分析 四则运算使用“后缀表达式”算法来计算,后缀表达式可以无需考虑运算符优先级,直接从左至右依次计算。 问题分解成2部分,一是将“中缀表…
刷题阶段性计划
Dec 19th – Jan 11th around 20 days Need to do medium questions of these tags: DFS BFS DP Stack Heap Trie…
716. Max Stack
Hard 讲真这道题说不上Hard吧,对Stack, PriorityQueue稍微熟悉一点就能做,注意几点: PriorityQueue的constructor,我一开始纠结于那个initial capacity要怎么…
84. Largest Rectangle in Histogram-hard
84. Largest Rectangle in Histogram 题目 Given n non-negative integers representing the histogram's bar height wh…
11. Container With Most Water
欢迎fork and star:Nowcoder-Repository-github 11. Container With Most Water 题目 Given n non-negative integers a1, …
[LeetCode] Quad Tree Intersection 四叉树相交
A quadtree is a tree data in which each internal node has exactly four children: topLeft, top…
LeetCode 121 Best Time to Buy and Sell Stock
题目描述 Say you have an array for which the ith element is the price of a given stock on day i. If you were only …
[Leetcode] Cheapest Flights Within K Stops 计算最便宜票价
Cheapest Flights Within K Stops There are n cities connected by m flights. Each fight starts from city u and a…
【leetcode】59. Spiral Matrix II 方阵向内循环
1. 题目 Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For exam…
重复值问题
题目:Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function sho…