Maximum possible difference of two subsets of an array

Suppose, we have an integer array. The problem statement “Maximum possible difference of two subsets of an array” asks to find out the maximum possible difference between the two subsets of an array. Conditions to be followed: An array can contain repeating elements, but the highest frequency of an element …

Read more

Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’

Problem Statement The problem ” Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’ ” states that you have an “n” sized array containing integers. The numbers in the array are in a range of 0 to n-1. The problem statement asks to rearrange the array in …

Read more

Translate »