ABOUT ME

My photo
Rajahmundry, AndhraPradesh, India

Wipro NLTH Jan 2021 Coding Questions

 Question No 1:

            An e-commerce website wishes to analyze. the per-day sales of their products. The products are tagged from a to z and A to Z. The daily sales are merged into a sequence of the tags of the products sold in the day. The company wishes to identify the products that are purchased only one time in the day.


Write an algorithm to find the count of the product tags that occur only once in the sales sequence.

Input

The input consists of a string saleSequence representing sales of the day.


Output

Print an integer representing the count of the product tags that occur only once in the sales sequence.


Note

The Input string saleSequence is case sensitive. Uppercase characters and lowercase characters are counted as different.


Example

Input:
    alphaadida

Output:
    4

Explanation:
    The product tags that occurred once in the sales
sequences are l,p,h,i. so the output is 4.


NOTE-- Wipro 2021 using python 2.7 version.



        inp=raw_input()
        c=0
        for i in inp:
            if inp.count(i)==1:
                c+=1
        print(c)
  

No comments:

Post a Comment