Next Greater Element III at DoorDash
Medium35.1% acceptance
This problem has 62.5% frequency at DoorDash.
Problem Description
Given a positive integer `n`, find _the smallest integer which has exactly the same digits existing in the integer_ `n` _and is greater in value than_ `n`. If no such positive integer exists, return `-1`. **Note** that the returned integer should fit in **32-bit integer** , if there is a valid answ...
Read full problem and hintsTopics
Also asked at 13 companies
More DoorDash Questions
Search Suggestions SystemMediumMost Profit Assigning WorkMediumCheck if One String Swap Can Make Strings EqualEasyMinimum Number of Steps to Make Two Strings AnagramMediumFind K Closest ElementsMedium
View all DoorDash questions