Next Greater Numerically Balanced Number at Sprinklr

Medium63.0% acceptance

This problem has 87.5% frequency at Sprinklr.

Problem Description

An integer `x` is **numerically balanced** if for every digit `d` in the number `x`, there are **exactly** `d` occurrences of that digit in `x`. Given an integer `n`, return _the**smallest numerically balanced** number **strictly greater** than _`n` _._

Read full problem and hints

Topics

Also asked at 4 companies


More Sprinklr Questions

View all Sprinklr questions