Publicis Sapient
Interview Questions and Answers
You have been given an undirected graph with 'N' vertices and 'M' edges. The vertices are labelled from 1 to 'N'.
Your task is to find if the graph contains a cycle or not.
A ...read more
You are given a 2-dimensional array/list having N rows and M columns, which is filled with ones(1) and zeroes(0). 1 signifies land, and 0 signifies water.
A cell is said to be connected to...read more
You are given a string 'STR' consisting of lowercase English alphabet letters. You can perform at most 'K' operations on this string. In one operation, you can choose any character of...read more
You have been given a matrix of ‘N’ rows and ‘M’ columns filled up with integers. Find the minimum sum that can be obtained from a path which from cell (x,y) and ends at the top left corner (1,...read more
A thief is robbing a store and can carry a maximum weight of ‘W’ into his knapsack. There are 'N' items available in the store and the weight and value of each item is known to the thief. Considerin...read more
Q6. If I am ready to accept a project in Java, if Sapient had trained you in DotNet earlier
I would be ready to accept a project in Java even if I was trained in DotNet earlier.
I have a strong foundation in programming principles and concepts, which can be applied to any language.
I am confident in my ability to quickly learn and adapt to new technologies.
I have experience working with multiple programming languages and frameworks.
I can leverage my knowledge of DotNet to understand similar concepts in Java.
I am motivated and enthusiastic about taking on new challenge...read more
Q7. Without lifting the pen meet 9 point arranged in squre of 3×3, using 4 lines?
Connect 9 points in a 3x3 square using 4 lines without lifting the pen.
Start at any point and draw a line to the adjacent point
Continue drawing lines until all points are connected
Make sure the lines intersect to form a square
Q8. WAP to check if no is palindrom or not?
A program to check if a given number is a palindrome or not.
Convert the number to a string.
Reverse the string and compare it with the original string.
If they are equal, the number is a palindrome.
If not, the number is not a palindrome.
Q9. Inheritence in java?
Inheritance in Java allows a class to inherit properties and methods from another class.
Inheritance is achieved using the 'extends' keyword.
The class that is being inherited from is called the superclass or parent class.
The class that inherits from the superclass is called the subclass or child class.
Subclasses can access the public and protected members of the superclass.
Inheritance promotes code reusability and allows for the creation of hierarchical relationships.
Top HR Questions asked in null
Interview Process at null
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month