给定string stringA和string stringB,编写程序确认两字符串包含的字符是否完全相同,注意大小写为不同字符,且考虑字符串中的空格,返回一个bool,代表两串是否由一样的字符组成。保证两串的长度都小于等于5000。
示例1
输入
"This is nowcoder","is This nowcoder"
输出
true
示例2
输入
"Here you are","Are you here"
输出
false
加载中...
import java.util.*; public class Same { public boolean checkSam(String stringA, String stringB) { // write code here } }
class Same { public: bool checkSam(string stringA, string stringB) { // write code here } };
# -*- coding:utf-8 -*- class Same: def checkSam(self, stringA, stringB): # write code here
class Same { public bool checkSam(string stringA, string stringB) { // write code here } }
"This is nowcoder","is This nowcoder"
true
"Here you are","Are you here"
false