C++ program to check whether a string2 can be formed from string1
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Example - 1
Yes,String2 can be formed from String1.
Example - 2
No, because ‘l’ comes 3 times in ‘Helll’ while there is only two ‘l’ present in IncludeHelp.
Example - 3
No, ‘i’ is in lower case in String2 while in String1, ‘I’ is in upper case (Case sensitive).
Hope you get all the points to be considered through above Examples.
Now come to the program, for faster and effective result we use concept of Count Array.
To learn about Count Array (implementation and use) go through the program C++ program to find the frequency of a character in a string using Count Array.
Program to check whether a string2 can be formed from string1 in C++
Output
need an explanation for this answer? contact us directly to get an explanation for this answer