#stack
Read more stories on Hashnode
Articles with this tag
Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. (link) Implement the LRUCache class: LRUCache(int...
Problem You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very...
Problem We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represents its size, and...
Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle...
Problem Given an array, find the nearest smaller element G[i] for every element A[i] in the array such that the element has an index smaller than i....
Problem Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after...