Category: Stacks

0

Stock Span Problem

“Stock Span Problem” is a classic problem of stack data structure, asked in technical interviews of many product-based companies. Here, we are given a price of a single stock for ‘N’ consecutive days and our...

0

Print Bracket Number

“Print Bracket Number” is a stack based basic problem asked in technical round of product- based company. Here, in this problem, we are given a expression string of balanced brackets and our task is...

0

Length of Longest Valid Substring

“Length of Longest Valid Substring” is one of the famous technical and algorithmic interview problem based on stack data structure. Here, we are given a string consisting of open and closing parentheses and our...

0

Merge Overlapping Intervals

“Merge Overlapping Intervals” is a standard application of stack data structure. Here, we have given set of intervals and our task is to merge all overlapping intervals and then print the resultant non-overlapping intervals. Example:...