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.
I really don't understand what it wanted me to do.
it doesn't complicate, but i have to research to understand that what it really wanted me to do
// Write your code herearr:=make([][]int32,n)result:=make([]int32,0)lastAnswer:=int32(0);for_,query:=rangequeries{qType:=query[0]x:=query[1]y:=query[2]idx:=(x^lastAnswer)%nifqType==1{arr[idx]=append(arr[idx],y)}elseifqType==2{lastAnswer=arr[idx][y%int32(len(arr[idx]))]result=append(result,lastAnswer)}}returnresult
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Dynamic Array
You are viewing a single comment's thread. Return to all comments →
I really don't understand what it wanted me to do. it doesn't complicate, but i have to research to understand that what it really wanted me to do