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.
Input Description:
You are given a string ‘s’
Given a sentence and string S, find how many times S occurs in the given sentence.If S is not found in the sentence print -1
Input Size : |sentence| <= 1000000(complexity O(n)).
Sample Testcase :
INPUT
I enjoy doing codekata
codekata
OUTPUT
1
Input Description:
You are given a string ‘s’
Output Description:
Print the remaining string
Print the remaining string
Sample Input : mississipie
Sample Output : mpe
You are given a number with duplicate digits your task is to remove the immediate duplicate digits and print the result
Input Description:
You are given a long string of digits
You are given a long string of digits
Output Description:
Print the desired result print -1 if result length is 0
Print the desired result print -1 if result length is 0
Sample Input : 1331
Sample Output : 11
Given a sentence and string S, find how many times S occurs in the given sentence.If S is not found in the sentence print -1
Input Size : |sentence| <= 1000000(complexity O(n)).
Sample Testcase :
INPUT
I enjoy doing codekata
codekata
OUTPUT
1
Comments
Post a Comment