Skip to content
Related Articles

Related Articles

Improve Article

Samsung R & D Interview Experience

  • Difficulty Level : Hard
  • Last Updated : 04 Nov, 2019

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:

    Hey geek! It's time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And if you are looking for a more complete interview preparation resource, check out Complete Interview Preparation Course that will prepare you for the SDE role of your dreams!

    Feeling prepared enough for your interview? Test your skills with our Test Series that will help you prepare for top companies like Amazon, Microsft, TCS, Wipro, Google and many more!

    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:

  • You have to code in a coding editor which is provided by Samsung.
  • You have to implement required data structures like stacks, queues, etc from scratch and you are not allowed to use default data structures (like STL in C++ or Collection in JAVA) provided by the programming languages.
  • There are generally 50 test cases or more (in my case there were 100), all of which have to be passed in order to get selected.
  • The Stack size and Heap size are limited. I can’t recall the exact restrictions but they require you to code an efficient solution. Generally what happens is that during backtracking the number of recursive calls gets out of bounds leading to filling up of stack memory and eventually wrong answers. So try to eliminate duplicate cases during backtracking and the number of variables used. Design your solution keeping these things in mind.
  • No other library except I/O is allowed to be used.
  • In my experience backtracking problems come in the form of a puzzle, and the problems on graphs are not very twisted and you can easily figure out what to use.
  • The number of submissions allowed is capped to 10 but you can run test cases any number of times even with your own test cases.
My Personal Notes arrow_drop_up
Recommended Articles
Page :