The Number of Beautiful Subsets at Infosys
Medium50.9% acceptance
This problem has 75.0% frequency at Infosys.
Problem Description
You are given an array `nums` of positive integers and a **positive** integer `k`. A subset of `nums` is **beautiful** if it does not contain two integers with an absolute difference equal to `k`. Return _the number of**non-empty beautiful** subsets of the array_ `nums`. A **subset** of `nums` is...
Read full problem and hintsTopics
Also asked at 3 companies
More Infosys Questions
Two SumEasyLongest Substring Without Repeating CharactersMediumPalindrome NumberEasyLongest Palindromic SubstringMediumLargest Number After Mutating SubstringMedium
View all Infosys questions