Practice problem ( 07 - 10 -2023)

1.) Write a program for following code:

i/p = “hello world”
o/p = accepted

i/p = “hello$ world”
o/p = not accepted

2.) Program to remove all duplicates from a given string

3.) Program for least frequent character in string

4.) Program to count the number of matching characters in a pair of string

string = “hello”
string1 = “emplot”
o/p = 3 because e,l,o are common