Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .

0 like 0 dislike
4,936 views
Link to all the TCS_NQT Coding Questions and Answers of year 2022 : https://www.desiqna.in/tag/tcs_nqt
in Online Assessments by Expert (144,420 points)
edited by

2 Answers

0 like 0 dislike
 
Best answer

C++ code : 

#include <bits/stdc++.h>

using namespace std;
typedef long long int ll ; 
int main() {
    string a,b;
    cin>>a>>b ;
    map <char,ll> kk ; 
    ll n = b.size();
    ll i = 0 ; 
    while(i<n){
        char g = b[i];
        kk[g]++;
        i++;
    }
    n = a.size();
     i = 0 ; 
    while(i<n){
        char g = a[i];
        if(kk[g]==0){
            cout<<g ; 
        }
        i++;
    }
    
    return 0;
}
by Expert (144,420 points)
0 like 0 dislike

Code Question Pics : 

by Expert (144,420 points)
...