Premium Employer

Publicis Sapient

3.5
based on 3k Reviews
Filter interviews by

Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations
Q1. Cycle Detection In Undirected Graph

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

View 3 more answers
Q2. Find Number of Islands

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

Add your answer
Q3. Longest Repeating Substring

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

View 2 more answers
Q4. Minimum Cost Path

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

View 3 more answers
Discover null interview dos and don'ts from real experiences
Q5. 0 1 Knapsack

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

View 4 more answers

Q6. If I am ready to accept a project in Java, if Sapient had trained you in DotNet earlier

Ans.

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

Add your answer

Q7. Without lifting the pen meet 9 point arranged in squre of 3×3, using 4 lines?

Ans.

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

Add your answer

Q8. WAP to check if no is palindrom or not?

Ans.

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.

Add your answer

Q9. Inheritence in java?

Ans.

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.

View 2 more answers
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at null

based on 4 interviews in the last 1 year
Interview experience
3.8
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

4.3
 • 55 Interview Questions
3.7
 • 50 Interview Questions
4.0
 • 20 Interview Questions
4.1
 • 16 Interview Questions
3.8
 • 16 Interview Questions
3.4
 • 15 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter