Good Evening sir, Sir today I had Assessment of Infosys and these were the Questions:
Q1 : group size elements
if odd -> y[i] -y[i-1] = A
else -> y[i] -y[i-1] = B
count min elements to complete group
Q2 : N - size of each array
k - 1 to k elements
n>=2 a[n] > a[n-1]
and if a[i] < a[i-1] then a[i]< a[i+1]
give count of possible arrays.
Q3 : N array total K partitions, and same parity of each partition element 1st and last. Give count of such possible partitions.
Q4: Find all Permutations:
conditions
1. i<j and a[i] > a[j]
2. 1 to n elements
3. k -> forgot
4. m -> max smaller no. in right for every a[i] in Permutation