127 questions · from 31 interviews · 6 asked more than once
Infosys interview questions
Every question candidates reported from their Infosys interviews, most frequently asked first. Each links to the write-up it came from, so you can see the round and how it went.
Infosys coding and DSA questions
- 01
LRU Cache
Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement get and put methods with O(1) time complexity.
Medium · Asked 2 times · From Infosys L3 Interview Experience - Out of Campus (HackWithInfy)
- 02
Delete Operation for Two Strings
Given two strings, I had to make both strings equal by deleting characters. In one step, I could delete one character from either string. The goal was to find the minimum number of steps required to make them identical.
Asked 2 times · From Infosys | Specialist Programmer | Pan india
- 03
Buy and Sell Stocks 2 (Greedy Selection)
Given an array of packet values and a fixed budget, select packets alternatingly from odd and even indices, always picking the highest available value each time, to maximize the total value within the budget.
- 04
Trapping Rain Water with Contaminated Pillars
Given an elevation map, some pillars are marked as contaminated and cannot hold water. Compute the total amount of water that can be trapped while excluding the water that would touch the contaminated pillars.
- 05
String Partition with Equal Unique Count
Given a string S (|S| ≤ 10^5), count the number of ways to partition S into contiguous substrings such that each substring contains the same number of distinct characters.
- 06
Binary String Minimum Flips for Alternating Pattern
Given a binary string, you may flip any bit (0 → 1 or 1 → 0) but you cannot flip two adjacent characters. Determine the minimum number of flips required to make the string alternating (either 0101… or 1010…).
- 07
Maximize Gap Between Products of Even and Odd Index Subsets
Given an array, construct A1 using elements at even indices and A2 using elements at odd indices. Let maxProd be the maximum product of any two elements from A1, and minProd be the minimum product of any two elements from A2. Find the maximum possible value…
- 08
Find 10th Highest Salary
Write a SQL query to find the 10th highest salary from an employee salary table.
- 09
Second Highest Salary (SQL)
Write a SQL query to find the second-highest salary from a table.
Medium · From Infosys Interview Experience — 2 YOE
- 10
Assign Cookies with parity constraint
Given an array of cookie sizes and an array of children's greed factors, assign cookies to children such that the parity (even/odd) of the cookie size matches the parity of the child's greed. Maximize the number of satisfied children.
Easy · From Infosys OnCampus Interview Experience for DSE/SP role
- 11
Count unordered pairs within distance k
Given an array code[] and an integer k, count the number of unordered pairs (i, j) such that i < j, code[i] = code[j] and j - i ≤ k.
- 12
Check rotated variation substring
Given a string S and a pattern string S1, determine whether S1 appears as a substring in any rotation of S.
- 13
Generate subset of all subsequences of a string
Given a string S, generate the set containing every possible subsequence of S (the power set of subsequences). Implement the brute‑force approach with O(2^n) complexity.
- 14
Product of array except self
Given an integer array nums, return an array output where output[i] is the product of all elements of nums except nums[i] without using division and in O(n) time.
Medium · From Infosys OnCampus Interview Experience for DSE/SP role
- 15
Longest substring without repeating characters
Given a string s, find the length of the longest substring without repeating characters.
Medium · From Infosys OnCampus Interview Experience for DSE/SP role
- 16
Minimum Battery Replacements With One Capacity Boost
You are driving an electric vehicle from position 0 to a destination located at position target. The vehicle starts with a battery that allows it to travel at most startBattery distance. Along the route, there are n battery replacement stations. You are given…
From Infosys | OA | Minimum Battery Replacements With One Capacity Boost
- 17
Minimize Cost by Replacing One Arc with Shim
Given a wheel and an arc array where arc[0] and arc[n‑1] are attached. The arcs may together cover 360 degrees or not. We must replace exactly one arc[i] with shim[i]. If the total degree formed by arc + shim is less than 360°, we compute the difference and…
- 18
Two‑Station Scheduling with One Removable B
We have two stations and two arrays a and b of length N. Each index represents a unit that must be processed first on station 1 for a[i] time, then on station 2 for b[i] time. We may order the units arbitrarily. Exactly one b[i] can be erased (its…
- 19
Sum of (Maximum‑Minimum) Over All Sub‑arrays Using DSU
We have p levels and use a Disjoint Set Union (DSU) to find the relative rank of each level. For each possible level arrangement we compute abs(maximum - minimum) for that arrangement and need to sum these values over all possible arrangements. After…
- 20
Min Cost Path with At Most K Jumps (CHT DP)
Given a sorted array a and an array b, you can jump from index i to a later index j (i < j). The jump cost is (a[i] - a[j])² + b[j]. Using at most K jumps you must reach the last index (n‑1) with minimum total cost. Constraints: K ≤ 100. A straightforward DP…
- 21
Maximize Items Selection with Reusable Cooler Bag Cost
You are given: - An integer n, the number of items. - An array cost[0…n‑1] where cost[i] is the price of the i‑th item. - An array type[0…n‑1] where each type[i] is either 0 or 1. - An integer B, the total budget available. - An integer C, the cost of a…
- 22
Sort Colors (Dutch National Flag)
Given an array containing only 0s, 1s, and 2s, sort the array in-place so that all 0s come first, then all 1s, and finally all 2s. The algorithm should run in linear time and use constant extra space.
Medium · From Infosys HackWithInfy 2026 (Specialist Programmer L3) Interview Experience Selected L1
- 23
Top K Frequent Elements
Given an integer array, return the k most frequent elements. The result can be returned in any order. Aim for an algorithm with better than O(n log n) time complexity.
Medium · From Infosys HackWithInfy 2026 (Specialist Programmer L3) Interview Experience Selected L1
- 24
Top-K Salaries Department-wise without LIMIT
Write an SQL query to find employees that have the top K salaries in each department, without using the LIMIT clause. The solution should use subqueries or window functions such as DENSERANK or RANK to achieve the ranking per department.
From Infosys HackWithInfy 2026 (Specialist Programmer L3) Interview Experience Selected L1
- 25
Water Jug Problem (8L-5L-3L)
Solve the classic water jug problem with jugs of capacities 8L, 5L, and 3L to obtain two jugs each containing 4L.
Medium · From 🚀 HackWithINFY 2026 – Round 2 Cleared & Pre-Placement Interview Experience 💙
46 more in the Infosys write-ups.
Infosys system design questions
- 01
Design WhatsApp High-Level System
Design WhatsApp at a high level (HLD), discussing the major components, data flow, scalability considerations, and how the system would work at large scale.
- 02
Uber ER Diagram and System Design Discussion
Discuss a high‑level ER diagram and system design for a ride‑sharing service similar to Uber.
- 03
Project Deep‑Dive and Architecture Diagram
Provide a detailed walkthrough of my project, covering the APIs used, authentication methods, and draw the overall system architecture.
- 04
Microservices & API Gateway
The interviewer asked about communication patterns and the advantages of using Microservices and API Gateway.
From Infosys Interview Experience | Associate Consultant (Pune) | 2.5+ Years Experience
- 05
Optimize E-commerce Order Filtering (COD/Prepaid)
Given a list of orders for an e-commerce site with filters, how would you optimize filtering when a user wants to filter the list by 'Cash on Delivery (COD)' or 'Prepaid' options? The interviewer specifically questioned my initial approach, stating it…
- 06
Application Performance and Scalability
Performance-related questions to my application. Like how will you handle multiple users at a time, what if there's an issue with the server, etc?
Medium · From Infosys HackWithInfy Interview Experience for DSE 2022
Infosys behavioural and HR questions
- 01
CAP Theorem
Explain the CAP theorem and its implications for distributed systems.
- 02
SQL and Redis and CAP Theorem
Describe how SQL databases and Redis relate to the CAP theorem.
- 03
Discussion on Coding Contest Ranks and Achievements
Talk about my rankings in competitive programming contests and any notable achievements.
- 04
Discussion on Current Internship
Describe my current internship responsibilities, projects, and technologies used.
- 05
Project Deep Dive
In the second round, I had a detailed discussion about my previous projects. I was asked to explain the features I had delivered, my exact contributions to the team, and the business impact of those features.
From Infosys Interview Experience | Associate Consultant (Pune) | 2.5+ Years Experience
- 06
Handle Team Conflict
During the managerial round, I was presented with a scenario: 'How would you handle a conflict within the team?' This tested my problem-solving mindset, leadership qualities, and consulting approach.
From Infosys Interview Experience | Associate Consultant (Pune) | 2.5+ Years Experience
- 07
Self-Introduction and PPT Presentation
I was asked to introduce myself and present my prepared PowerPoint presentation.
From My Infosys Specialist Programmer Interview Experience – March 2025
- 08
Reasons for Choosing AI
The interviewer asked why I chose AI as my specialization.
From My Infosys Specialist Programmer Interview Experience – March 2025
- 09
AI Application in Projects
I was asked how I have used AI technology in my projects.
From My Infosys Specialist Programmer Interview Experience – March 2025
- 10
Internship Project Details
I was asked in-depth questions about the projects I worked on during my internships.
From My Infosys Specialist Programmer Interview Experience – March 2025
- 11
Technologies Used in Internships
The interviewer inquired about the technologies I used during my internships.
From My Infosys Specialist Programmer Interview Experience – March 2025
- 12
Introduce Yourself
Brief me about yourself.
- 13
Why Infosys?
Why do you want to join Infosys?
- 14
Questions for Interviewer
Do you have any questions for me?
Infosys other questions
- 01
Explain ACID Properties
Describe the ACID properties (Atomicity, Consistency, Isolation, Durability) in the context of database transactions.
Asked 3 times · From Infosys | Specialist Programmer | 2023 batch
- 02
Explain Inheritance and its Types
Elaborate on the concept of Inheritance in OOP. Discuss different types of inheritance, specifically focusing on Multiple and Multilevel Inheritance.
Asked 2 times · From Infosys | Specialist Programmer | 2023 batch
- 03
What is Indexing in DBMS?
I was asked to explain what indexing is in Database Management Systems.
Asked 2 times · From Infosys | Specialist Programmer | Pan india
- 04
What are Views in DBMS?
The interviewer inquired about the concept of Views in Database Management Systems.
Asked 2 times · From Infosys | Specialist Programmer | Pan india
- 05
Daily successful transaction count per department
Write an SQL query to return, for each day and each department, the count of successful transactions. The schema includes a products(productId, deptId, price) table and a transaction(productId, deptId, transactionDate, price, status) table where status…
- 06
Operator Overloading Explanation
Explain operator overloading with an example.
From 🚀 HackWithINFY 2026 – Round 2 Cleared & Pre-Placement Interview Experience 💙
- 07
Fragmentation in Operating Systems
Discuss fragmentation in operating systems and the different types of fragmentation.
- 08
Design Patterns: Singleton and Factory
Explain the Singleton and Factory design patterns, including their use cases and advantages.
- 09
SQL vs NoSQL
Compare relational (SQL) databases with NoSQL databases, covering key differences and use‑cases.
- 10
SQL Query to Concatenate Full Name Handling NULLs
Write an SQL query that returns a column fullname by concatenating firstname, middlename, and lastname, where middlename and lastname may be NULL.
- 11
Stack vs Heap Memory in C++
Explain the differences between stack and heap memory allocation in C++, including when each is used and their performance characteristics.
- 12
OOPs Concepts
Basic questions related to Object-Oriented Programming concepts such as Encapsulation, Inheritance, Polymorphism, and Abstraction. This includes defining them and providing real-world examples.
- 13
Basic SQL Concepts
Fundamental questions about SQL, including common commands (SELECT, INSERT, UPDATE, DELETE), different types of joins (INNER, LEFT, RIGHT, FULL), and database normalization forms.
- 14
Basic HTML/CSS Concepts
Questions on foundational web technologies like HTML structure, common tags, CSS selectors, box model, and how to style web pages.
- 15
Java 8 Stream API Concepts
I was questioned on the use cases, filtering, mapping, and grouping functionalities of the Java 8 Stream API.
From Infosys Interview Experience | Associate Consultant (Pune) | 2.5+ Years Experience
- 16
Spring Boot Exception Handling
I had to explain the differences and use cases between @ControllerAdvice and @ExceptionHandler in Spring Boot for exception handling.
From Infosys Interview Experience | Associate Consultant (Pune) | 2.5+ Years Experience
- 17
Core AI Concepts & Real-World Applications
The discussion involved core AI concepts and their real-world applications.
From My Infosys Specialist Programmer Interview Experience – March 2025
- 18
OOPs Concepts with Real-World Examples
Since I mentioned Java as my primary language, I was asked about OOPs concepts with real-world examples. I used a Banking System analogy for my explanation.
From My Infosys Specialist Programmer Interview Experience – March 2025
- 19
Interfaces in Java
The interviewer asked about Interfaces in Java.
From My Infosys Specialist Programmer Interview Experience – March 2025
- 20
Call by Value/Call by Reference in Java
I was questioned about Call by Value and Call by Reference in Java.
From My Infosys Specialist Programmer Interview Experience – March 2025
- 21
Memory Management in Java
The interviewer asked about Memory Management in Java.
From My Infosys Specialist Programmer Interview Experience – March 2025
- 22
Why Java Doesn't Support Multiple Inheritance
A specific question was posed: Why doesn’t Java support Multiple Inheritance?
From My Infosys Specialist Programmer Interview Experience – March 2025
- 23
Pillars of OOPS
Explain the four fundamental pillars of Object-Oriented Programming: Abstraction, Encapsulation, Inheritance, and Polymorphism.
- 24
Explain Abstraction
Describe the concept of Abstraction in Object-Oriented Programming. Provide examples of how it's achieved.
- 25
WHERE vs. HAVING Clause
Explain the key differences between the WHERE and HAVING clauses in SQL, and when each should be used.
11 more in the Infosys write-ups.
Infosys interview questions FAQ
What questions are asked in Infosys interviews?
Candidates reported 127 distinct questions across 31 Infosys interviews. 71 coding and DSA questions, 6 system design questions, 14 behavioural and HR questions, 36 other questions.
Which Infosys interview questions are asked most often?
The most repeated are "Explain ACID Properties" (3 times), "LRU Cache" (2 times), "Explain Inheritance and its Types" (2 times), "Delete Operation for Two Strings" (2 times), "What is Indexing in DBMS?" (2 times).
How difficult are Infosys interview questions?
Of the questions candidates rated, 41% were easy, 39% medium and 20% hard.