string getLongestRegex(string a, string b, string c)
{
const size_t n = a.size();
int idx = -1;
for (int i = 0; i < n; i++) {
if (c[i] != a[i] && c[i] != b[i]) { idx = i; }
}
if (idx == -1) return "-1";
string res;
for (int i = 0; i < n; i++) {
if (i == idx) {
string cur = "[";
for (int j = 'A'; j <= 'Z'; j++) if (j != c[i]) cur += j;
cur += "]";
res += cur;
} else {
res += "[ABCDEFGHIJKLMNOPQRSTUVWXYZ]";
}
}
return res;
}
C++
Amazon
Telegram:- @allcoding1_official
{
const size_t n = a.size();
int idx = -1;
for (int i = 0; i < n; i++) {
if (c[i] != a[i] && c[i] != b[i]) { idx = i; }
}
if (idx == -1) return "-1";
string res;
for (int i = 0; i < n; i++) {
if (i == idx) {
string cur = "[";
for (int j = 'A'; j <= 'Z'; j++) if (j != c[i]) cur += j;
cur += "]";
res += cur;
} else {
res += "[ABCDEFGHIJKLMNOPQRSTUVWXYZ]";
}
}
return res;
}
C++
Amazon
Telegram:- @allcoding1_official
π25β€4
π
ΎοΈFree off cost
πALL IT companies (materials, exams questions & Answers paper's)
πALL software courses with certification
π ΎοΈFree off cost
Join now π
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
β Please send with your friends and college groups
πALL IT companies (materials, exams questions & Answers paper's)
πALL software courses with certification
π ΎοΈFree off cost
Join now π
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
β Please send with your friends and college groups
π40β€5π5π1
Both conclusions I and II are not definitely true based on the information provided.
Tech Mahindra exam Ans
@allcoding1_official
Tech Mahindra exam Ans
@allcoding1_official
π2
Both statements put together are sufficient to answer the problem
Tech Mahindra exam Ans
@allcoding1_official
Tech Mahindra exam Ans
@allcoding1_official