Problem Submissions Solution

K-Pangrams

Difficulty: Medium

Acceptance: %

Points: 30.00

Given a string str and an integer k, determine if it is possible to transform the string into a pangram using at most k operations.

An operation consists of swapping any alphabetic character in the string with another lowercase alphabetic character.

Note: A pangram is a sentence that contains every letter of the English alphabet at least once.

Topics

Companies

Articles

Examples:

Expected Time Complexity: O(n)

Expected Auxiliary Space: O(1)

Constraints:
  • 1<= str.size() <= 10^5
  • 0<= k <= 50
  • str may contain duplicate characters
  • str contains only lowercase alphabets or spaces.
Companies:
Oracle Zoho
Topics:
String Hashing
Locked Content
Access Restricted: Please Login to access the code editor and test cases.