We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
this is my solution, it works for sample test case 0, but why doesn't it works when i submit the solution, i'm using nodejs, anyone have any idea what did i do wrong?
functionprocessData(input){//Enter your code hereconstentry=parseInt(input[0])constinputString=input.split('\n')letphoneBook={}for(leti=1;i<=entry;i++){letitems=inputString[i].split(' ');phoneBook[items[0]]=items[1]}for(leti=entry+1;i<inputString.length;i++){if(phoneBook[inputString[i]]){console.log(`${inputString[i]}=${phoneBook[inputString[i]]}`)}else{console.log('Notfound')}}}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 8: Dictionaries and Maps
You are viewing a single comment's thread. Return to all comments →
this is my solution, it works for sample test case 0, but why doesn't it works when i submit the solution, i'm using nodejs, anyone have any idea what did i do wrong?