Lakhankumawat / LearnCPP

Learn Cpp from Beginner to Advanced ✅ Practice 🎯 Code 💻 Repeat 🔁 One step solution for c++ beginners and cp enthusiasts.
https://lakhankumawat.github.io/LearnCPP/
MIT License
642 stars 490 forks source link

Find Kth distinct character from start of given String #1539

Closed 072arushi closed 2 years ago

072arushi commented 2 years ago

Description

Given string str of size N containing all possible characters including integers. Print Kth distinct character from the starting of the given string. If K is more than a number of distinct characters, print -1. Note: The uppercase and lowercase letters are considered different.

Examples: Input: str = “prophet1999”, K = 4 Output: h

Domain

CPP

Type of Contribution

Addition

Code of Conduct

github-actions[bot] commented 2 years ago

Hello @072arushi, thanks for creating your first issue at LearnCPP, hope you followed the guidelines.

072arushi commented 2 years ago

/assign

github-actions[bot] commented 2 years ago

This issue has been assigned to 072arushi! It will become unassigned if it is not closed within 12 days. A maintainer can also add the pinned label to prevent it from being unassigned.