Practice
Resources
Interview Guides
All Problems
Fast Track Courses
Community
Blog
Interview Preparation Kit
Video Courses
Contests
Online IDE
New
Online C++ Compiler
Online C Compiler
Online Python Compiler
Online Java Compiler
Online JavaScript Compiler
Free Mock
Powered By
Free Mock Assessment
Take popular mock tests for free with real life interview questions from top tech companies
Explore Mock Tests
Powered By
Mock Interview
Pair up with a peer like you and practise with hand-picked questions
Explore Mock Interviews
Events
New
Scaler
Please enter 3 or more characters
Experience Scaler
Experience Scaler
Profile
Settings
Help Requests
Profile
Settings
Help Requests
Login to experience InterviewBit
Sign in
Experience Scaler
Experience Scaler
Profile
Settings
Help Requests
Profile
Settings
Help Requests
Login to experience InterviewBit
Sign in
Practice
Improve your coding skills with our resources
Resources
Experience learning
Interview Guides
All Problems
Fast Track Courses
Community
Blog
Interview Preparation Kit
Video Courses
Contests
Compete in popular contests with top coders
Online IDE
Checkout our improved IDE
Online C++ Compiler
Online C Compiler
Online Python Compiler
Online Java Compiler
Online JavaScript Compiler
Free Mock
Assess yourself and prepare for interviews
Free Mock Assessment
Mock Interview
Events
Attend free live masterclass hosted by top tech professionals
New
Scaler
Explore Offerings by SCALER
Join Interviewbit
Get free unlimited access to our resources to help you prepare for your next tech interview
Sign Up or Login to get Started
Continue with Google
OR continue using other options
Are you sure you want to Exit?
You will not able to continue using resources without logging in.
Yes, Exit
No
Problem Discussion
Post a comment
This thread is for people who have not yet solved the problem. Please do not post solutions here.
A
aman-aryan_435
4 months ago
Why 2*x - minElement work, and x - minElement not?
0
Reply
S
siva-kumar_492
7 months ago
Please help. Why is my code failing?
0
Reply
S
seetha-ram-bethala
7 months ago
Python Solution for Min Stack
0
Reply
D
durden1997
8 months ago
Easy cpp solution using one stack
1
Reply
S
sujay-s_102
over 1 year ago
Easy Solution for Min stack
0
Reply
Y
yogendra-sonkar
over 1 year ago
Please tell me what's wrong in this code
0
Reply
R
rajat-gumber
over 1 year ago
Tricky to solve
0
Reply
C
cherabuddi-satwik-re
over 1 year ago
Hi simple c program
0
Reply
S
sunny-munda
over 1 year ago
What should i change in this code
0
Reply
R
rishabh-kumar_560
almost 2 years ago
Easiest and clear solution CPP
0
Reply
A
ashutosh-kumar_486
almost 2 years ago
C++ soln using two stack super easy
0
Reply
S
shubham-raj_302
almost 2 years ago
Simple code accepted
0
Reply
2
20b81a05u3-cvr-ac-in
almost 2 years ago
Min stack in java
0
Reply
O
om-subham-pati-4-yea
almost 2 years ago
Simple Array implementation || TC- O(1)
0
Reply
A
aayush-gupta_584
almost 2 years ago
Single Stack || Cpp implementaion || TC- O(1)
2
Reply
A
ashish-kumar_289_911
about 2 years ago
Please tell me what is the difference between code1 and code2 attached. Why code1 is not getting accepted whereas code2 got accepted
2
Reply
R
rohit-roy_242
about 2 years ago
Easy Java Solution, Easy to understand
0
Reply
M
mudit-kumar_814
over 2 years ago
A small advice | Stack | C++
1
Reply
V
vanshu-kumar-garg
over 2 years ago
Stack || o(1) || easy implementation
1
Reply
V
vanshu-kumar-garg
over 2 years ago
Koi is code m mughe mistake bta deo agr h kisi me dum?
0
Reply
P
parimala-s
almost 3 years ago
Python Solution - O(1) Time - Using Two Stacks
0
Reply
M
mahesh-fathepur
almost 3 years ago
Incorrect problem statement or not clear instructions
0
Reply
A
aryan-khanuja
almost 3 years ago
Code using 1 stack of pair
0
Reply
S
shivam2000_7df671abd
almost 3 years ago
C++ || 2-stacks || Understandable Approach
0
Reply
2
201901027_c06e783660
almost 3 years ago
Easy solution using C++ || stack
0
Reply
K
kunal-yewale
almost 3 years ago
Correct test case in testing, garbage on submitting for test case "586 g t t g P 593848644 t p t t t t p P 680232627 P 383101258..."
11
Reply
A
arya-pandey-31
almost 3 years ago
Must Read for 2 stack implementation || C++
1
Reply
P
pradeepa14
about 3 years ago
What is wrong with my pop method ? why it is not working correctly
1
Reply
S
sarthak-garg_636
almost 4 years ago
GETTING RUN TIME ERROR < Please help
2
Reply
Post a comment
This thread is for people who have solved the problem. You may discuss your solutions here.
A
aman-sirohi_231
9 months ago
Python solution (with comments)
0
Reply
L
lucky-tiwari
over 1 year ago
One stack and Pair
0
Reply
A
aditya-sabde
over 2 years ago
Easy Java Solution using Two Stack
0
Reply
2
201901164_2011ec5ffa
over 2 years ago
Using two stacks
0
Reply
V
vineela-konagala
about 3 years ago
Using 2 stacks, one is normal stack and other stores the min element
0
Reply
H
hariom7
over 3 years ago
https://www.quora.com/How-would-you-design-a-stack-which-in-addition-to-push-and-pop-also-has-a-function-min-which-returns-the-minimum-element-Push-pop-and-min-should-all-operate-in-requisite-O-1-time
0
Reply
N
Nakul37
over 3 years ago
Getting error on submission while on test it was correct
0
Reply
V
Vrishchik
almost 4 years ago
One stack ,O(1) operation cpp
0
Reply
G
gauravdhama2000_8d08
almost 4 years ago
O(1) time O(1) space solution
0
Reply
A
akhilesh-mani-tripat
almost 4 years ago
C++ | Single stack O(1) approach
1
Reply
S
Shanmukh_BitsPilani
almost 4 years ago
C++ | Using 2 stacks
1
Reply
I
imran-wahid
almost 4 years ago
Easy C++ solution using auxiliary stack
0
Reply
S
sai-sharan-m
almost 4 years ago
Wohoo! Python:)
0
Reply
R
rajendra_thottempudi
almost 4 years ago
Compiler/test case is wierd
0
Reply
R
rohitkumargit
almost 4 years ago
What's problem with this implementation
0
Reply
K
keerthana1411
about 4 years ago
Something very wierd with JAVA compiler
4
Reply
U
udaykiranreddy-sadul
over 4 years ago
Min Stack Implementation C++
0
Reply
A
apes-strong
over 4 years ago
C++ easy two vector approach
0
Reply
N
niraj-singh
over 4 years ago
Giving wrong answe cant find the bug . anyone?
0
Reply
A
ashish-karkera
over 4 years ago
Python (Solution) O(1) time for all functions
0
Reply
R
richeek-awasthi
over 4 years ago
Simplest python soln
2
Reply
M
maninder-singh_725
over 4 years ago
What is the use of constructor in the editorial solution
0
Reply
S
SW-7
over 4 years ago
Compiler sucks...! Custom test case is showing correct result while same testcase during submition is showing wrong result
1
Reply
P
pranshukushwaha_9b77
over 4 years ago
O(1) time with O(1) extra space! Happy coding!
4
Reply
Y
yuvrajbhati2507_192d
over 4 years ago
O(1) Space Complexity in Java -->
0
Reply
S
sainiankit724_12e62d
over 4 years ago
Simple c++ solution O(1) time complexity
0
Reply
R
raunak-rathour
almost 5 years ago
Very Easy C++ Sol. Using 1 Stack All Operations O(1)
19
Reply
W
weichen-hu
almost 5 years ago
Get min with O(1)
0
Reply
S
sankalp-chelani
almost 5 years ago
C++ || 2 stacks || remember to initialize in constructor(lost 100 pts because of this)
0
Reply
Click here to start solving coding interview questions
Join Interviewbit
Get free unlimited access to our resources to help you prepare for your next tech interview
Sign Up or Login to get Started
Continue with Google
OR continue using other options
Join Interviewbit
Get free unlimited access to our resources to help you prepare for your next tech interview
Sign Up or Login to get Started
Continue with Google
OR continue using other options
Unlock the complete InterviewBit
experience for free
Sign Up Using
Or use email
1 Million +
Strong Tech Community
500 +
Questions to Practice
100 +
Expert Interview Guides
Free Mock Assessment
Powered By
Fill up the details for personalised experience.
Phone Number
*
OTP will be sent to this number for verification
+1
*
Type to search
+1
No results found
Phone Number
Change Number
Graduation Year
*
Graduation Year
*
Type to search
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
No results found
*
Enter the expected year of graduation if you're student
Current Employer
Company Name
Type to search
No results found
College you graduated from
College/University Name
Type to search
No results found
Job Title
Job Title
Type to search
Engineering Leadership
Software Development Engineer (Backend)
Software Development Engineer (Frontend)
Software Development Engineer (Full Stack)
Data Scientist
Android Engineer
iOS Engineer
Devops Engineer
Support Engineer
Research Engineer
Engineering Intern
QA Engineer
Co-founder
SDET
Product Manager
Product Designer
Backend Architect
Program Manager
Release Engineer
Security Leadership
Database Administrator
Data Analyst
Data Engineer
Non Coder
Other
No results found
Please verify your phone number
Edit
Resend OTP
By clicking on Start Test, I agree to be contacted by Scaler in the future.
Already have an account?
Log in
Free Mock Assessment
Powered By
Instructions from Interviewbit
Start Test