SarthakKeshari / CPP-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
47 stars 132 forks source link

Added Smallest String With A Given Numeric Value #370

Closed ThejaswinS closed 2 years ago

ThejaswinS commented 2 years ago

Issue Id you have worked upon -

369

Briefly explain your program logic -

the string will aways be in the form starting with a and end with z so "axxxzzz" so we initially assign all with 'a' and then check from end greater than 26 we append letter 'z' else append the character with k remaining.

Screenshots(Attach 2 screenshots of your own input and output) -

Attach here image image


Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your code for merging -