[deleted]
There were a total of 5 questions 2 mcq (one based on bit operations, and the next on stack operations) 3 coding (two medium and one hard question)
https://ibb.co/L1PW2Bq : The of the questions (medium)
Array operations are boring and fun! You are given two arrays of integers a1, a2,
an a and b1, b2, . . . , bn. Let's define a transformation of the array a: Choose any non-negative integer k such that 0 ≤ k ≤ n. Choose kdistinct array indices
1≤i1< i2 . . . < ig ≤ n Add 1 to each of Qi1, Qi2, • . • , Qik, all other elements
of array a remain unchanged. Permute the elements of array a in any order. Is it possible to perform some
transformation of the array a exactly once, so that the resulting array is equal to b?
Complete the function trans formArray in the editor below. transformArray should return True if
array a can be transformed into array b
by the operation mentioned above, otherwise, return False.
transformArray has the following parameter(s):
a: a string representing array, each element is separated by space
b: a string representing array, each element is separated by space
Question
Overview
Solution
Thanks! Could you also describe other questions?