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 code but I am getting timeout exceeded and I am not able to optimize further
defxorKey(x,queries):# Write your code herelst=[]forjinqueries:a,l,r=jy=filter(lambdai:l<=iandi<=r,x)res=set([a^kforkiny])lst.append(max(res))returnlst
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
XOR key
You are viewing a single comment's thread. Return to all comments →
This is my code but I am getting timeout exceeded and I am not able to optimize further