Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 556. Next Greater Element III
Find the smallest integer greater than n that uses exactly the same digits (i.e., the next lexicographic permutation of n's digits); return -1 if no such permutation exists or if the result exceeds the 32-bit signed integer limit (2^31−1).
Asked at:
Meta
G
Goldman Sachs
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid July, 2025
Meta
Mid-level
Next Greater Element III
Late June, 2025
G
Goldman Sachs
Mid-level
Late January, 2025
Meta
Senior
Given an integer, find the next smallest integer that can be formed using the same digits.
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.