Open In App

Samsung R & D Interview Experience

Round 1: Online Coding Round First round is an online programming round with 2 questions.

  1. Given an array of elements and change the array in such a way that all the elements on the array are distinct. if you are replacing a value, then the replacing value should be great than the previous value and after modification sum of the elements should be as less as possible.

    Example 1:



    Input: arr[1, 2, 3, 4, 5, 5, 5] and the result should be [1, 2, 3, 4, 5, 6, 7] 

    Example 2:

    Input: arr[1, 2, 5, 7, 8, 8, 7]  and the result should be [1, 2, 5, 7, 8, 9, 10]
    or [1, 2, 5, 7, 8, 10, 9]
  2. The second question is similar to LCS with a slight modification. that is Find the longest common subsequence that all the characters present in the subsequence should be of vowels.
    Example:

    input: abcef, ffiocd then the answer should be 3 (abc, ioc)

Questions asked in the 3-hr coding round for Samsung R&D recruitment

  1. There is a single problem statement that involves concepts like Backtracking (recursion), Graphs(Traversal, Coloring, etc).

     Now the points to be noted are:

Article Tags :