Samsung

You might also like

You are on page 1of 1

Online test (day 1) - English, aptitude and reasoning, coding.

Coding - three
simple questions in C,C++ or Java - string manipulation, linked lists. No complex
data structures or algorithms.
Group discussion (day 2) - Topic was given and we must present our ideas one by
one. No debate followed though. Our topic - Give one challenge faced by digital
india and how to start solving it

Interview Questions

Print reverse of a string without creating another string


1. Given an array of numbers, find whether a particular digit exist in the numbers
of array
2. A binary matrix of n X m, you have to toggle any column k number of times so
that you can get maximum rows having all 1
3. Given a graph having edges defining the probability of going to a particular
node, say edge u-v denotes the probability of going v from u. you can stay at any
node for 10 minutes. Starting from node 1, on which node you will be after T
minutes and with what probability.
4. Find a cycle, if exists, in a directed graph. If there is none, print 0. If
there is one, print the path starting from the first node of the cycle to the last.
If there are more than one, print any path. Test cases to be passed-10 max
5. It was a combination of Rat in a Maze and longest subpath problem.
6. Find if given graph is bipartite or not, if it is bipartite then print either
white color nodes or black color nodes.
7. Find a cycle in the graph
8. Find a cycle in LinkedList
9. Variation of traveling salesman solved using backtracking (Optimization on
traveling salesman )
10. We were given a graph question. We have to find the loop in the graph if it
exists and print the nodes of the loop in sorted order.

You might also like