Longest Balanced Subsequence in a Range

Company: UIDAI_23jan

Difficulty: medium