Upload Button Icon Add office photos

Infosys Consulting

Compare button icon Compare button icon Compare

Filter interviews by

Infosys Consulting Java Developer Interview Questions and Answers

Updated 7 May 2021

Infosys Consulting Java Developer Interview Experiences

1 interview found

Interview Questionnaire 

1 Question

  • Q1. Basic questions on java

Top trending discussions

View All
Interview Tips & Stories
2w
toobluntforu
·
works at
Cvent
Can speak English, can’t deliver in interviews
I feel like I can't speak fluently during interviews. I do know english well and use it daily to communicate, but the moment I'm in an interview, I just get stuck. since it's not my first language, I struggle to express what I actually feel. I know the answer in my head, but I just can’t deliver it properly at that moment. Please guide me
Got a question about Infosys Consulting?
Ask anonymously on communities.

Interview questions from similar companies

I appeared for an interview before Mar 2021.

Round 1 - Coding Test 

(3 Questions)

Round duration - 60 minutes
Round difficulty - Medium

21 students were shortlisted from the 1st MCQ round and in this round we were asked to write the codes (function only) of 3 questions in 1 hour time.

  • Q1. 

    Rotting Oranges Problem Statement

    You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:

    • 0 - representing an empty cell
    • 1 - representing a fre...
  • Ans. 

    Find the minimum time required to rot all fresh oranges in a grid.

    • Use Breadth First Search (BFS) to simulate the rotting process

    • Track the time taken to rot all oranges and return -1 if any fresh oranges remain

    • Handle edge cases like no fresh oranges or all oranges already rotten

    • Consider using a queue to efficiently process adjacent oranges

  • Answered by AI
  • Q2. 

    Majority Element Problem Statement

    Given an array/list 'ARR' consisting of 'N' integers, your task is to find the majority element in the array. If there is no majority element present, return -1.

    Exampl...

  • Ans. 

    Find the majority element in an array, return -1 if no majority element exists.

    • Iterate through the array and keep track of the count of each element using a hashmap.

    • Check if any element's count is greater than floor(N/2) to determine the majority element.

    • Return the majority element or -1 if no majority element exists.

  • Answered by AI
  • Q3. 

    Maximum Path Sum Between Two Leaves Problem Description

    You are provided with a non-empty binary tree in which each node contains a non-negative integer value. Your task is to find and return the maximum ...

  • Ans. 

    Find the maximum path sum between two leaf nodes in a binary tree.

    • Traverse the tree to find the maximum path sum between two leaf nodes.

    • Keep track of the maximum sum found so far.

    • Consider all possible paths between leaf nodes.

    • Handle cases where the tree has only a single leaf node.

    • Implement a recursive function to calculate the maximum path sum.

  • Answered by AI
Round 2 - Face to Face 

(3 Questions)

Round duration - 60 minutes
Round difficulty - Medium

This was a technical round with DSA based questions.

  • Q1. 

    N-th Node From The End Problem Statement

    You are given a Singly Linked List of integers. The task is to find the N-th node from the end of the list.

    Example:

    Input:
    If the given list is (1 -> -2 -&g...
  • Ans. 

    Find the N-th node from the end of a Singly Linked List of integers.

    • Traverse the list to find the length L of the list.

    • Calculate the position of the N-th node from the beginning as L - N + 1.

    • Traverse the list again to reach the calculated position and return the node's value.

  • Answered by AI
  • Q2. 

    LCA of Binary Tree Problem Statement

    You are given a binary tree consisting of distinct integers and two nodes, X and Y. Your task is to find and return the Lowest Common Ancestor (LCA) of these two nodes...

  • Ans. 

    Find the Lowest Common Ancestor (LCA) of two nodes in a binary tree.

    • Traverse the binary tree to find the paths from the root to nodes X and Y.

    • Compare the paths to find the last common node, which is the LCA.

    • Handle cases where one node is an ancestor of the other or when one node is the LCA itself.

  • Answered by AI
  • Q3. 

    Reverse Words in a String: Problem Statement

    You are given a string of length N. Your task is to reverse the string word by word. The input may contain multiple spaces between words and may have leading o...

  • Ans. 

    Reverse words in a string while handling leading/trailing spaces and multiple spaces between words.

    • Split the input string by spaces to get individual words

    • Reverse the list of words

    • Join the reversed words with a single space in between

    • Handle leading/trailing spaces by stripping them before and after reversing

  • Answered by AI
Round 3 - Face to Face 

(3 Questions)

Round duration - 60 minutes
Round difficulty - Easy

Technical Interview round with questions based on DSA

  • Q1. 

    Minimum Time To Solve The Problems

    Given 'N' subjects, each containing a certain number of problems, and 'K' friends, assign subjects to friends such that each subject goes to exactly one friend, maintain...

  • Ans. 

    Assign subjects to friends to minimize maximum workload, find minimum time for most loaded friend.

    • Sort subjects in descending order

    • Assign subjects to friends one by one until all subjects are assigned

    • The maximum workload will be the sum of problems assigned to the friend with the most problems

    • Return the maximum workload as the minimum time required

  • Answered by AI
  • Q2. What is grammar in the context of compiler design?
  • Ans. 

    Grammar in compiler design defines the syntax and structure of a programming language.

    • Grammar specifies the rules for forming valid statements in a programming language.

    • It consists of a set of production rules that define how valid programs can be constructed.

    • There are different types of grammars such as context-free grammar, regular grammar, etc.

    • Example: In C programming language, the grammar specifies that a for loop...

  • Answered by AI
  • Q3. What is a token in compiler design?
  • Ans. 

    A token in compiler design is a basic unit of syntax that the compiler can understand and process.

    • Tokens are the smallest units of a program that are meaningful to the compiler.

    • Examples of tokens include keywords, identifiers, operators, and punctuation symbols.

    • Tokens are generated by the lexical analysis phase of the compiler.

    • Tokens are used by the parser to build the abstract syntax tree of the program.

  • Answered by AI
Round 4 - Video Call 

(3 Questions)

Round duration - 60 minutes
Round difficulty - Easy

Technical round with questions on DSA and Compiler Design mainly. He told me that you’ll be having your final HR round in some time. I knew that I was going well because he seemed to be quite satisfied with my answers.

  • Q1. 

    Sum Root to Leaf Numbers

    You are given an arbitrary binary tree consisting of N nodes, each associated with an integer value from 1 to 9. Each root-to-leaf path can be considered a number formed by concat...

  • Ans. 

    Find the total sum of all root to leaf paths in a binary tree formed by concatenating node values.

    • Traverse the binary tree from root to leaf nodes, keeping track of the current path sum

    • Add the current path sum to the total sum when reaching a leaf node

    • Use modulo (10^9 + 7) to handle large outputs

  • Answered by AI
  • Q2. What is a regular language?
  • Ans. 

    A regular language is a language that can be recognized by a finite automaton.

    • Regular languages can be described by regular expressions.

    • Regular languages are closed under union, concatenation, and Kleene star operations.

    • Examples of regular languages include the set of all strings over an alphabet that contain an even number of 'a's.

  • Answered by AI
  • Q3. What are NP and NP-Hard problems?
  • Ans. 

    NP problems are decision problems that can be verified in polynomial time, while NP-Hard problems are at least as hard as the hardest problems in NP.

    • NP problems can be verified in polynomial time but not necessarily solved in polynomial time.

    • NP-Hard problems are at least as hard as the hardest problems in NP, but may not be in NP themselves.

    • Examples of NP problems include the subset sum problem and the traveling salesm...

  • Answered by AI
Round 5 - HR 

Round duration - 30 minutes
Round difficulty - Easy

That was the round for which I’ve been waiting for hours 
She was very friendly and nice to talk to. It didn’t seem that I was talking to the HR. It was more like talking to a friend. Finally we discussed about the pay-scale and work culture in Accolite.

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAAccolite Digital Pvt Ltd interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 6 monthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

Java Developer Interview Questions Asked at Other Companies

asked in Deloitte
Q1. Sort 0 and 1 Problem Statement Given an integer array ARR of size ... read more
Q2. Parent class has run() and walk(). Parent run() calls walk(). Chi ... read more
asked in Infosys
Q3. Which should be preferred between String and StringBuffer when th ... read more
Q4. How do you sort a list of students based on their first name?
asked in Cognizant
Q5. What array list and linkedlist difference,how hashmap internally ... read more

I applied via Campus Placement and was interviewed before Jan 2021. There were 3 interview rounds.

Interview Questionnaire 

3 Questions

  • Q1. 1. Write a code to split an array of integers into two subarray where both the array has equal sum.
  • Ans. 

    Code to split an array of integers into two subarrays with equal sum.

    • Iterate through the array and calculate the total sum.

    • Divide the sum by 2 to get the target sum for each subarray.

    • Use dynamic programming to find a subset of the array that adds up to the target sum.

    • Return the two subarrays.

    • Example: [1, 2, 3, 4, 5, 6] -> [1, 2, 3, 6], [4, 5]

    • Example: [1, 2, 3, 4, 5] -> [1, 4, 5], [2, 3]

  • Answered by AI
  • Q2. To write code to build up a binary tree from scratch (implement a BST) and then to write all the methods like all the tree traversal algo, and all other stuffs.
  • Ans. 

    Implementing a binary search tree and its traversal methods.

    • Start by defining a Node class with left and right child pointers.

    • Implement insert() method to add nodes to the tree.

    • Implement inorder(), preorder(), and postorder() traversal methods.

    • Implement search() method to find a node in the tree.

    • Implement delete() method to remove a node from the tree.

    • Consider edge cases like empty tree, duplicate nodes, etc.

  • Answered by AI
  • Q3. Other OOPs concept and questions related to DSA and OS.

Interview Preparation Tips

Interview preparation tips for other job seekers - Accolite has a difficult hiring bar and hires only the good ones. Focus on DSA concepts and practice as many questions from Leetcode, Interviewbits, GFG. Focus on all the OOPs concept and subject like OS.

Skills evaluated in this interview

Interview Questionnaire 

1 Question

  • Q1. Java multithreading, oops

I appeared for an interview before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 90 minutes
Round difficulty - Medium

It was very good

  • Q1. 

    Find the Longest Palindromic Substring

    Given a string ‘S’ composed of lowercase English letters, your task is to identify the longest palindromic substring within ‘S’.

    If there are multiple longest palin...

  • Ans. 

    Find the longest palindromic substring in a given string, returning the rightmost one if multiple exist.

    • Use dynamic programming to check if substrings are palindromes

    • Iterate through the string and expand around each character to find palindromic substrings

    • Keep track of the longest palindromic substring found

  • Answered by AI
  • Q2. 

    Minimum Sum in Matrix Problem Statement

    You are given a 2D matrix 'ARR' of size 'N x 3' with integers, where 'N' is the number of rows. Your task is to compute the smallest sum achievable by selecting one...

  • Ans. 

    Find the smallest sum achievable by selecting one element from each row of a 2D matrix, following certain constraints.

    • Iterate through each row and calculate the minimum sum by selecting elements that do not violate the constraints.

    • Keep track of the minimum sum achieved so far.

    • Avoid selecting elements directly beneath previously selected elements.

    • Example: For input [[1, 2, 3], [4, 8, 6], [1, 5, 3]], the optimal selectio...

  • Answered by AI
Round 2 - Face to Face 

Round duration - 1 hour
Round difficulty - Medium

It was a good interview

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from Techno India NJR Institute of Technology. I applied for the job as SDE - 1 in IndoreEligibility criteria7 cgpaTata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - I have done a rigourous training on Data Structure and Algorithms. It really helped me a lot to excel in life. Also I did vocational courses which enhanced my personality. I did analytical mindset training with problem solving methodologies. The hands on training on Python and Unix helped me a lot.Time required to prepare for the interview - 1 yearInterview preparation tips for other job seekers

Tip 1 : Daily practice programming
Tip 2 : Work with honesty
Tip 3 : Do with utmost dedication

Application resume tips for other job seekers

Tip 1 : Write with honesty
Tip 2 : Mention about your achievements

Final outcome of the interviewSelected

Skills evaluated in this interview

I applied via Campus Placement and was interviewed before Dec 2021. There were 4 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Aptitude Test 

Thre are aptitude question with coding round

Round 3 - Technical 

(1 Question)

  • Q1. Introduction Basics of programming
Round 4 - HR 

(1 Question)

  • Q1. HR questions introduced yourself family background

Interview Preparation Tips

Interview preparation tips for other job seekers - Be confident and believe in yourself. They might cross check you but your confidence matters

I applied via Company Website and was interviewed in Jun 2021. There was 1 interview round.

Interview Questionnaire 

1 Question

  • Q1. Related to react js amd js

Interview Preparation Tips

Interview preparation tips for other job seekers - Average interview. There will he two rounds technical. One will be telephonic and second will be skyp video.
Are these interview questions helpful?

I appeared for an interview in Oct 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Coding Test. This round was held on TCS own platform. The same platform is used for TCS Codevita. There were two questions in this test.
1. This was an easy level question based on Math.
2. This was a medium level question based on string manipulation

  • Q1. 

    Encode the Message Problem Statement

    Given a text message, your task is to return the Run-length Encoding of the given message.

    Run-length encoding is a fast and simple method of encoding strings, repres...

  • Ans. 

    Implement a function to encode a text message using run-length encoding.

    • Iterate through the message and count consecutive characters

    • Append the character and its count to the encoded message

    • Handle edge cases like single characters or empty message

  • Answered by AI
  • Q2. 

    Count Sequences With Product X Problem Statement

    You are provided with an array NUM containing N positive integers. Your objective is to find the total number of possible sequences of positive integers (g...

  • Ans. 

    Count the total number of possible sequences of positive integers whose product equals X.

    • Calculate the product X using the given formula

    • Find all the divisors of X

    • Count the number of sequences with product X by considering the divisors

  • Answered by AI
Round 2 - Face to Face 

Round duration - 30 minutes
Round difficulty - Medium

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from TIET - Thapar Institute of Engineering And Technology. I applied for the job as SDE - 1 in PuneEligibility criteriaAbove 6 CGPATata Consultancy Services (TCS) interview preparation:Topics to prepare for the interview - Data Structures, Pointers, OOPS, Algorithms, Dynamic Programming, DBMS, Operating System, System Design, Computer Networks, Machine Learning, C++, PythonTime required to prepare for the interview - 4 monthsInterview preparation tips for other job seekers

Tip 1 : Be thorough with your basics - Data Structures and Algorithms, Pointers, DBMS,OOPS,OS etc.
Tip 2 : Practice Competitive Programming. Improve your programming skills. (Take data structures course from CN. That's enough for cracking any service based or product based company). Practice questions from Leetcode/Codechef/Codeforces.
Tip 3 : Be confident in your answers. You should not fumble while giving answers.
Tip 4: Also have a good practice on aptitude. Managing time during the test is also an important skill.
Tip 5: Have good projects on recent technologies(ML/Web D/Blockchain/Analytics etc). Have in depth knowledge about the project as the interviewer can go deep and can ask difficult questions on projects as well. 
Tip 6: Start your preparation as early as possible and work on your communication skills as well.

Application resume tips for other job seekers

Tip 1: Mention good projects.
Tip 2: Write the things about which you're 100% sure that you can answer questions from those things.
Tip 3: Do not try to go high profile by mentioning too many skills/projects/extra curriculars on resume.

Final outcome of the interviewSelected

I applied via Campus Placement and was interviewed before Jul 2021. There were 5 interview rounds.

Round 1 - Aptitude Test 

Round 1 was about 60 mins long. Basic Aptitude questions along with Programming MCQ

Round 2 - Coding Test 

Round 2 had 2 coding questions with a time limit of 60mins. Intermediate level problem solving
knowledge is neccessary.

Round 3 - Technical 

(1 Question)

  • Q1. Technical Round 1 was 1hr long. Detailed Insights about my project and a few programming questions in DSA
Round 4 - Technical 

(1 Question)

  • Q1. This Technical Round 2 was 1hr long and was mainly focused on problem solving skills and a few basic programming concepts.
Round 5 - HR 

(1 Question)

  • Q1. Three Situational questions were asked .

Interview Preparation Tips

Topics to prepare for Bounteous x Accolite Software Developer interview:
  • Data Structures
  • Algorithms
  • CPP
  • Problem Solving
Interview preparation tips for other job seekers - Prepare Well . Perform well with full confidence

I applied via Naukri.com and was interviewed in Jun 2021. There were 3 interview rounds.

Interview Questionnaire 

1 Question

  • Q1. They asked me questions related to my project on which i had work in my last company. And there were questions from core java , database, collections, Spring framework ,

Interview Preparation Tips

Interview preparation tips for other job seekers - Just keep your basic clear , You must have a clear understanding of the topics which you prepare for interview.keep your basic very strong .

Tell us how to improve this page.

Infosys Consulting Java Developer Salary
based on 7 salaries
₹5 L/yr - ₹10.7 L/yr
16% more than the average Java Developer Salary in India
View more details
Senior Consultant
458 salaries
unlock blur

₹22 L/yr - ₹37.2 L/yr

Consultant
383 salaries
unlock blur

₹16 L/yr - ₹25.1 L/yr

Business Consultant
312 salaries
unlock blur

₹15 L/yr - ₹24.2 L/yr

Associate Consultant
143 salaries
unlock blur

₹6 L/yr - ₹13.4 L/yr

Management Consultant
137 salaries
unlock blur

₹16 L/yr - ₹27 L/yr

Explore more salaries
Compare Infosys Consulting with

ITC Infotech

3.7
Compare

CMS IT Services

3.1
Compare

KocharTech

3.9
Compare

3i Infotech

3.4
Compare
write
Share an Interview