TongTong Shi's Blog
A Playground to Share My Knowledge
Online Stock Span Online Stock Span
LeetCode Q 901 - Online Stock SpanWrite a class StockSpanner which collects daily price quotes for some stock, and retur
2019-06-15 Tong Shi
Check If Word Is Valid After Substitutions Check If Word Is Valid After Substitutions
LeetCode Q 1003 - Check If Word Is Valid After SubstitutionsWe are given that the string “abc” is valid.From any valid s
2019-06-15 Tong Shi
Largest Rectangle in Histogram Largest Rectangle in Histogram
LeetCode Q 84 - Largest Rectangle in HistogramGiven n non-negative integers representing the histogram’s bar height wher
2019-06-15 Tong Shi
132 Pattern 132 Pattern
LeetCode Q 456 - 132 PatternGiven a sequence of n integers a1, a2, …, an, a 132 pattern is a subsequence ai, aj, ak such
2019-06-15 Tong Shi
Next Greater Element III Next Greater Element III
LeetCode Q 556 - Next Greater Element IIIGiven a positive 32-bit integer n, you need to find the smallest 32-bit integer
2019-06-15 Tong Shi
Next Greater Element I Next Greater Element I
LeetCode Q 496 - Next Greater Element IYou are given two arrays (without duplicates) nums1 and nums2 where nums1’s eleme
2019-06-14 Tong Shi
24 / 79