give array integer arrwe want select index j k 0 j k arrlengthLets define b followsa arri arri 1 arrj 1b arrj arrj 1 arrkNote denote bitwisexor operationReturn number triplet j k where b Example 1input arr 23167output 4explanation the triplet 012 022 234 244example 2input arr 11111output 10 Constraints1 arrlength 3001 arri 108