2. Rahul is given a task to manipulate a string, He hired you as a
developer your task is to delete all the repeating characters and print
the result left. CHECK WITH 4
4. You are given a number with duplicate digits your task is to remove the immediate duplicate digits and print the result
Sample Input : mississipie
Sample Output : mpe
3.You are given a string.Your task is to print only the consonants present in the string without affecting the sentence spacings if present. If no consonants are present print -1
Sample Input : I am shrey
Sample Output : m shry
Sample Input : 1331
Sample Output : 11
9.you are given a string made up of parenthesis only.Your task is to check whether parenthesis are balanced or not.If they are balanced print 1 else print 0
Sample Input :
{({})}
Sample Output : 1
10.Joyal was given a sentence. His task is to
delete the two words that comes together and print the sentence so that
the words in the output sentence have distinct words compared to their
adjacent words. If no words are present in the output sentence print -1
Input Description:
You are given input string 'S'
You are given input string 'S'
Output Description:
Print the all the words that are left in the string 's' so that the words in the output sentence have distinct words compared to their adjacent words. Print -1 if no words are left
Print the all the words that are left in the string 's' so that the words in the output sentence have distinct words compared to their adjacent words. Print -1 if no words are left
Sample Input : I am john cena cena john
Sample Output : I am
Comments
Post a Comment