String Construction

  • + 0 comments

    Approach:

    1. Use set to strore the element.
    2. Traverse the string and inset all the string character inside the set.
    3. As it is set, It stores only distinct element
    4. Return the size of the set.