Комментарии:
Itne easy question 😁
ОтветитьUsing a map for the setting the frequencies of each char in str1 and then finding the one who is added in str2 will be a good approach??
ОтветитьPlease make this mock interview video in english
ОтветитьFor the first Question :
1) Brute force: Running two loops and checking which is not in other string
2) sort both string
Then traverse cheak every char is equal or not if not then return
3) creating bool array
Mark ascii number of first string each char as true then traverse second string cheak which char give false ans then return
4) same as 3 rd one but of extra stack space : Creating map instead of visited bool array
Iiterate modified string as s.find(c)
Which return false that char is ans
she doesn't know how to code , and that's all.
ОтветитьKya chutiyaap chal raha tha yahan pe ???
Ye geeksforgeeks hai.... waaah , yehi banayenge general AI ya time machine...
( and i am talking about the guys taking the interview )
Nice job sir
ОтветитьCould you please provide experienced questions in C++?
ОтветитьFirst question can be solved in O(n) time and O(1) space if we count the sum of all elements ascii value in s1 string and same done for s2 string as well and then subtract it you will get your answer in c++.
ОтветитьHow to delete last node from sll, with that particular node(last node) address only
Ответитьhow can i apply for the interview
ОтветитьAdd ord(character) of each string separately and subtract them you are done for the first question....
ОтветитьShe is clearer now: English. My apology
ОтветитьGood program. I am failing to follow her. Is she speaking in English?
ОтветитьFirst question just count the freq of each character in both the string and compare the freq whichever dont match thats the ans
OR
sort both the strings and then iterate with the shorter one wherever it doesn't match is the ans
Please try to make videos or another channel on SAP technical and financial configuration
ОтветитьSir for two strings S1,S2 we will check every characters of S1 string with S2 string's character and which are present in both we will put them in another string S3 & at last we will compare S2 & S3 that which character is missing from S3.
The character which is missing from S3 will be our answer (i.e the character which is added into S2).
Using loop
S1= ab
S2=ab after adding a character in S2 then S2=abc
Now using loop we will check that S1
for(i=0;i<S1.length;i++)
{
char x=S1[i];
for(j=0;j<S2.length;j++)
{
char y=S2[j]
if(y==x)
S3=S2[j]
}
}
now check which character is different is missing in S3
Why u guys always making interviews in c++,?why not python..?🙄
Ответить