Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Samsung interview experience Real time questions & tips from candidates to crack your interview

Frontend Developer Intern

Samsung
upvote
share-icon
3 rounds | 11 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 Months
Topics: Data Structures and Algorithms, OOPS, Spring, Operating Systems, Computer Networks, Design Patterns
Tip
Tip

Tip 1 : You should be proficient in one of the 2 languages: C++, Java
Tip 2 : For each of the 4 pillars of OOPS, focus on 4 important aspects i.e. definition, use case, real-world eg., advantages.
Tip 3 : Learn about general design patterns like, Singelton, Factory, Builder etc.

Application process
Where: Campus
Eligibility: 7.5 CGPA
Resume Tip
Resume tip

Tip 1 : Mentions your past experiences.
Tip 2 : Mention at least 2 projects.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration70 Minutes
Interview date12 Sep 2020
Coding problem3

This online coding round, consisted of 3 DSA problems and we were supposed to solve them in 70 mins. 
Programming Languages allowed: C, C++, JAVA
Note: Python was not available.

1. Cousins of Given Node in Binary Tree

Moderate
10m average time
90% success
0/80
Asked in companies
FlipkartPaytm (One97 Communications Limited)Samsung

Given a binary tree of N nodes and a node of this tree, you need to return a list containing the values of the cousins of the given node in the given binary tree sorted by non-decreasing order of their values.

Note:
Two nodes of a binary tree are cousins if they have the same depth or level, but have different parents.

No two nodes in the given binary tree will have the same data values.
Example :

Example Of Cousins

Try solving now

2. Maximum Sum Path Of A Binary Tree.

Hard
25m average time
75% success
0/120
Asked in companies
HikeInfosysSamsung

You are given a binary tree having 'n' nodes. Each node of the tree has an integer value.


Your task is to find the maximum possible sum of a simple path between any two nodes (possibly the same) of the given tree.


A simple path is a path between any two nodes of a tree, such that no edge in the path is repeated twice. The sum of a simple path is defined as the summation of all node values in a path.

Try solving now

3. Gold mine problem

Moderate
35m average time
70% success
0/80
Asked in companies
SamsungTata Consultancy Services (TCS)Goldman Sachs

You have been given a gold mine represented by a 2-d matrix of size ('N' * 'M') 'N' rows and 'M' columns. Each field/cell in this mine contains a positive integer, the amount of gold in kgs.

Initially, the miner is at the first column but can be at any row.

He can move only right, right up, or right down. That is from a given cell and the miner can move to the cell diagonally up towards the right or right or diagonally down towards the right.

Find out the maximum amount of gold he can collect.

Try solving now
02
Round
Medium
Face to Face
Duration45 Minutes
Interview date14 Sep 2020
Coding problem5

This was the first technical round and those who cleared the online coding assessment round were eligible for this round. This round consisted of questions from DSA, CS Fundamentals, my projects and questions related to frontend.
What are the various formatting tags in HTML? What is DOM? What is the significance of and tag in HTML?

1. Remove Consecutive Duplicates

Easy
0/40
Asked in companies
OlaTata Consultancy Services (TCS)Walmart

You are given a string ‘str’ of size ‘N’. Your task is to remove consecutive duplicates from this string recursively.

For example:

If the input string is ‘str’ = ”aazbbby”, then your output will be “azby”.
Note that we are just removing adjacent duplicates.
Try solving now

2. Reverse Linked List

Moderate
15m average time
85% success
0/80
Asked in companies
Paytm (One97 Communications Limited)Hexaware TechnologiesMyntra

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Try solving now

3. Implement Trie

Hard
41m average time
0/120
Asked in companies
UberInfosysTata Consultancy Services (TCS)

Implement Trie Data Structure to support these operations:

insert(word) - To insert a string "word" in Trie
search(word) - To check if string "word" is present in Trie or not.
startsWith(word) - To check if there is any string in the Trie that starts with the given prefix string "word".


Three type of queries denote these operations:

Type 1: To insert a string "word" in Trie.
1 word

Type 2: To check if the string "word" is present in Trie or not.
2 word

Type 3: To check if there is any string in the Trie that starts with the given prefix string "word".
3 word


Try solving now

4. OS Question

What is a process in OS?

5. OOPS Question

What is a singleton class? Write code for the same.

03
Round
Medium
Face to Face
Duration45 Minutes
Interview date14 Sep 2020
Coding problem3

This was the second technical round and those who cleared the previous interview round were eligible for this round. This round consisted of questions from DSA, CS Fundamentals majorly OOPS, and my projects. How can we club two or more rows or columns into a single row or column in an HTML table?

1. Rat In A Maze

Easy
15m average time
85% success
0/40
Asked in companies
GoogleGoldman SachsIBM

You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a square matrix of order 'N' * 'N' where the cells with value 0 represent the maze’s blocked locations while value 1 is the open/available path that the rat can take to reach its destination. The rat's destination is at ('N' - 1, 'N' - 1). Your task is to find all the possible paths that the rat can take to reach from source to destination in the maze. The possible directions that it can take to move in the maze are 'U'(up) i.e. (x, y - 1) , 'D'(down) i.e. (x, y + 1) , 'L' (left) i.e. (x - 1, y), 'R' (right) i.e. (x + 1, y).

Note:
Here, sorted paths mean that the expected output should be in alphabetical order.
For Example:
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1 
Expected Output:
DDRDRR DRDDRR 
i.e. Path-1: DDRDRR and Path-2: DRDDRR

The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
Try solving now

2. OOPS Question

Describe 4 pillars of OOPS.

3. Technical Question

What is Divide and Conquer algorithm. Give examples where we use this algorithm.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which is a DDL command in SQL?

Choose another skill to practice
Start a Discussion
Similar interview experiences
company logo
SDE - Intern
2 rounds | 8 problems
Interviewed by Samsung
744 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Samsung
1301 views
1 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Samsung
1354 views
1 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Samsung
108 views
0 comments
0 upvotes