alt_438's blog

By alt_438, history, 21 month(s) ago, In English

You are given an array of size N. you are also given M queries with each query Qi having a number k. you can perform the following operation during each query: XOR each element of A with k. Now,the answer to the query is the mex of A.

let R be an array of size M.the with element in R must be the answer to the ith query. your task is to return R. Note:-> A returns to its original state after each query. Constraints:-> 1<=N<=10^5 1<=M<=10^5

Full text and comments »

  • Vote: I like it
  • +10
  • Vote: I do not like it

By alt_438, history, 3 years ago, In English

Given a positive integer N and a digit D. The task is to find out the place value of a digit D in the given number N. If multiple occurrences of digit occur then find the maximum place value. please suggest how to solve this problem.

Full text and comments »

  • Vote: I like it
  • -8
  • Vote: I do not like it