Trilogy Innovations(CodeNation), Recently Asked Questions for Online Assessments, November, 2022 | Count Good Subarrays | LIS with Reversal |

CodeNation · Question · Posted Nov 2022

Avg CTC: 18lpa Question 1 <problem>215</problem> Count Good Subarrays You are given array of non negative integers A. There is a special move allowed to you in which you can select any two elements and subtract 2^i from each element if their bitwise AND contains 1 at i'th bit. You can perform the operation any number of time. An array is called good if by using above special moves you can reduce it to an array of zeroes. Now you ...

The full answer & interview discussion are available to premium members.

Log in Create a free account