Sparse Array Problem | HackerRank | Problem Solving | Data Structure | Array | Interview

preview_player
Показать описание
This video is about HackerRank Sparse Array problem.
Here we are given two string 1st is input string and 2nd is query string, we have to find the occurrence of query string in input string.
For example, given input string=['ab','ab','abc'] and queries=['ab','abc','bc'], we find 2 instances of 'ab'., 1 of '' abc' and 0 of 'bc''. For each query, we add an element to our return array[2,1,0] .

For 1 : 1 Tutoring
WhatsApp contact : 7278222619

Follow me on:
Whatsapp:

Facebook:

Linkedin:

Instagram:

#HackerRank #Interview #ProblemSolving #Array
Рекомендации по теме
Комментарии
Автор

You are making coding seem so easy.. thank you

sushmamc
Автор

Bro you are not posting videos 😭 please don’t stop posting I understand topics only from your way of teaching plz don’t stop....make videos on hacker rank interview preparation kit plz

sahilbisht
Автор

count=0
for i in queries:
for j in strings:
if i==j:
count+=1
print(count)
what is wrong in this code?? am getting 2 3 3 as output...

pujithagaddale
Автор

Hello Sir, The solution was good, but can't we use this function?
def matchingStrings(strings, queries):
temp=[]
for i in queries:

return temp

Anurag-kpwc
join shbcf.ru