
Infosys Interview Experience
Infosys privite limited Interview Experience for Fresher Specialist Programmer, Dec 2025
Specialist Programmer
Fresher
Campus
6 Months
No backlogs. (Salary Package: 11 LPA)
Computer Science Engineering
2 Rounds
Application Experience
I applied for the Specialist Programmer role at Infosys through my college placement drive. The process began with an online assessment round consisting of four coding questions. To become eligible for the Specialist Programmer (L1) role, it was required to solve at least two questions with 100% of the test cases passing. After clearing the online assessment, I was shortlisted for the interview rounds. The interviews were conducted in physical mode at my college campus and lasted for approximately 1 hour and 35 minutes. The process mainly focused on evaluating my problem-solving skills, technical knowledge, and understanding of my projects. Overall, the entire process was well-organized and provided a great learning experience.
Preparation
Topics Prepared: Data Structures, Algorithms, Dynamic Programming, Trees, Graphs, Greedy Algorithms, Segment Trees, Object-Oriented Programming (OOP), SQL, Full Stack Development
Preparation Tips
Tip 1: Be consistent with DSA and focus on problem-solving patterns rather than just solving random questions. Tip 2: Revise core concepts like Data Structures, OOP, DBMS, and practice explaining your approach clearly. Tip 3: Build and deeply understand real-world projects so that you can confidently discuss them during interviews.
Resume Tips
Tip 1: Include strong projects with clear impact and be ready to explain each of them in detail. Tip 2: Do not add anything to your resume that you cannot justify or explain during the interview.
Interview Rounds (2)
Detailed breakdown of each evaluation round, questions asked, and candidate approaches.
Round 1 — Online Coding Test
Problems & Questions Asked (2)
Oggy and Cockkroaches
Oggy and Cockroaches are playing a game. 'N' cockroaches are hidden inside the holes in a straight line numbered from 1, 2,.., 'N'(i.e. 'i'th cockroach is present at coordinate 'i' where 0 < 'i' <= 'N'). At the time 't', the cockroach at position 'X[t]' comes out of the hole with 'A[t]' coins where 0 < 't' <= 'N'. Initially, at time 't' = 0, Oggy is at coordinate 0 and has 0 coins. Each second, he can remain idle or move only to its adjacent coordinates. Oggy can collect the coins from 'i'th cockroach only if he is at the coordinate 'i' exactly when it appears. You can assume that no time is taken to collect the coins. Return a number 'C' denoting the maximum number of coins Oggy can collect. Note: Assume 1-based indexing. For example: Let 'N' = 5, 'X' = [1, 2, 4, 3, 5] and 'A' = [20, 0, 10, 0, 1]. Oggy moves to position 1 and collects 'A[1]' coins at time t = 1. Then, Oggy will move to position 5, which takes 4 seconds. So, at time t = 5, he will collect 1 coin. In total, he will be able to collect 21 coins. Hence, the answer will be 21. Input Format:- The first line contains an integer 'T', which denotes the number of test cases. For every test case:- The first line contains one integer, 'N', denoting the total number of cockroaches. The second line contains the array 'X' having 'N' space-separated integers, denoting the position of the cockroach that comes out of the hole at some time. The third line contains the array 'A' having 'N' space-separated integers, denoting the number of coins each cockroach has when they come out of the hole. Output Format:- For each test case, Return a number 'C' denoting the maximum number of coins Oggy can collect. Note:- You don’t need to print anything. Just implement the given function. Constraints:- 1 <= 'T' <= 10 1 <= 'N' <= 10^3 1 <= 'X[i]' <= 'N' 0 <= 'A[i]' <= 10^4 Time Limit: 1-sec
Step 1: Sort the cockroaches by their distance from 0 (closest first). Step 2: Sort the bullets in descending order of power. Step 3: For each bullet: Use its power to kill cockroaches one by one. Reduce the bullet’s power after each kill. Move to the next cockroach. Step 4: While killing, ensure that no cockroach reaches 0 before being killed. If yes → return -1 Step 5: If all cockroaches are killed → return the minimum time.
City And Bridges
Ninja got a map in his hand with ‘N’ cities numbered 0 to ‘N’, connected with bridges. He asks his sister to delete some cities from the map. He will ask his sister a ‘Q’ query. Each query is denoted by an integer ‘X’, meaning that he will delete the city ‘X’. He wants to see if the new map obtained after deleting the city node will have more connected components than the previous map. He wants to build the program for the queries given by his sister for the above condition. Ninja knows that you are a very good programmer and can help him in writing the code for the above. Help Ninja! Note: A connected component in the map is the maximum subset of cities that are connected i.e we can go from one city to any other in that subset. Input format : The first line of input contains an integer ‘T’, which denotes the number of test cases. Then each test case follows. The first line of each test case contains two separated integers ‘N’ and ‘M’ denoting ‘N’ cities and ‘M’ bridges. Each of the next ‘M’ lines contains 2 integers ‘A’ and ‘B’, meaning that there is an edge between city A and city B. The next line contains a single integer ‘Q’ denoting the number of queries The next line contains ‘Q’ space-separated integers denoting the value of the nodes to be deleted. Output format : For each query, if deleting the city on the map results in more number of connected components then print ‘Yes’, else print ‘No’. Output for each query will be printed separated by a single space. Constraints: 1 <= T <= 5 1 <= N <= 10^5 1 <= M <= 10^5 0 <= A <= N 1 <= B <= N 1 <= X <= N Time Limit : 1 sec.
Store points using a map for fast lookup Start BFS from (1,1) From (x, y) → check points within range (x±2, y±2) Use map to efficiently find neighbors (avoid O(n²)) Mark visited and push into queue If (n, m) reached → return distance Else → return -1
Round 2 — Face to Face
Problems & Questions Asked (5)
Sort Biotonic DLL
Sort the given biotonic doubly linked list. Note : Biotonic Doubly linked list is the one which is first increasing and then decreasing. A strictly increasing or strictly decreasing doubly linked list is also biotonic. Input format : The first line of input contains a single integer T, representing the number of test cases or queries to be run. Then the T test cases follow. The first and the only line of every test case contains the elements of the doubly linked list separated by a single space and terminated by -1. Hence, -1 would never be a list element. Output Format : For each test case, print the sorted doubly linked list. The output of each test case is printed in a separate line. Note: You do not need to print anything, it has already been taken care of. Just implement the given function. Constraints : 1 <= T <= 10 1 <= N <= 5 * 10^4 -10^9 <= data <= 10^9 and data != -1 Where T is the number of test cases, N is the length of the doubly linked list. Time Limit : 1sec
Find middle using slow & fast pointers Split the list into two halves Recursively sort both halves Merge two sorted lists While merging, update next and prev pointers Return the new head
Sum Of Node Distances
You have been given an array/list ‘EDGES’ of size (N - 1) x 2 representing the undirected connected tree with ‘N’ nodes from 0…’N’ - 1 and ‘N’ - 1 edges such that the i’th edge connects ‘EDGES[i][0]’ node with ‘EDGES[i][1]’ node. You need to print an array/list ‘ANS’, where ANS[i] is the sum of the distances between node ‘i’ and all other nodes. For example: For ‘N’ = 6 and ‘EDGES’ = [ [0,1], [0, 2], [2, 3], [2, 4], [2, 5] ], see the below picture for reference: 1. For node 0: a. Distance from node 0 to node 1 is 1. b. Distance from node 0 to node 2 is 1. c. Distance from node 0 to node 3 is 2. d. Distance from node 0 to node 4 is 2. e. Distance from node 0 to node 5 is 2. So the sum of all the distances is 8. 2. For node 1: a. Distance from node 1 to node 0 is 1. b. Distance from node 1 to node 2 is 2. c. Distance from node 1 to node 3 is 3. d. Distance from node 1 to node 4 is 3. e. Distance from node 1 to node 5 is 3. So the sum of all the distances is 12. 3. For node 2: a. Distance from node 2 to node 0 is 1. b. Distance from node 2 to node 1 is 2. c. Distance from node 2 to node 3 is 1. d. Distance from node 2 to node 4 is 1. e. Distance from node 2 to node 5 is 1. So the sum of all the distances is 6. 4. For node 3: a. Distance from node 3 to node 0 is 2. b. Distance from node 3 to node 1 is 3. c. Distance from node 3 to node 2 is 1. d. Distance from node 3 to node 4 is 2. e. Distance from node 3 to node 5 is 2. So the sum of all the distances is 6. 5. For node 4: a. Distance from node 4 to node 0 is 2. b. Distance from node 4 to node 1 is 3. c. Distance from node 4 to node 2 is 1. d. Distance from node 4 to node 3 is 2. e. Distance from node 4 to node 5 is 2. So the sum of all the distances is 6. 6. For node 5: a. Distance from node 5 to node 0 is 2. b. Distance from node 5 to node 1 is 3. c. Distance from node 5 to node 2 is 1. d. Distance from node 5 to node 3 is 2. e. Distance from node 5 to node 4 is 2. So the sum of all the distances is 6. So, ‘ANS’ for the above example will be [8, 12, 6, 10, 10, 10]. Input Format The first line of input contains an integer 'T' representing the number of test cases. Then the test cases follow. The first line of each test case contains an integer ‘N’ representing the number of nodes in the tree. The next ‘N’ - 1 lines of each test case contains two single space separated integers denoting ‘EDGES[i][0]’ and ‘EDGES[i][1]’. Output Format : For each test case, print a single line containing space-separated integers denoting the sum of distances of each node from a node. The output for each test case is printed in a separate line. Note: You don't have to print anything. It has already been taken care of. Just implement the given function. Constraints : 1 <= T <= 100 1 <= N <= 10 ^ 4 0 <= EDGE[i][0] and EDGE[i][1] < N Time limit: 1 sec
* Build a graph with edge indices * Push all police stations into the queue (multi-source BFS) * Mark them visited with distance = 0 * Run BFS while `dist < d` * If visiting an already visited node → mark that edge for removal * Continue BFS * Output all removed edge indices
Root to Leaf Path
You are given an arbitrary binary tree consisting of 'N' nodes numbered from 1 to 'N'. Your task is to print all the root to leaf paths of the binary tree. A leaf of a binary tree is the node which does not have a left child and a right child. For Example : Given a binary tree : All the root to leaf paths are : 1 2 4 1 2 5 1 3 Note : 1. Two nodes may have the same value associated with it. 2. The root node will be fixed and will be provided in the function. 3. Note that the nodes in a path will appear in a fixed order. For example, 1 2 3 is not the same as 2 1 3. 4. Each path should be returned as a string consisting of nodes in order and separated by a space. 5. The path length may be as small as ‘1’. Input Format : The first line contains an integer 'N', which denotes the number of nodes in the tree. The second line will contain the values of the nodes of the tree in the level order form ( -1 for 'NULL' node) Refer to the example for further clarification. Example : Consider the binary tree The input of the tree depicted in the image above will be like : 1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1 Explanation : Level 1 : The root node of the tree is 1 Level 2 : Left child of 1 = 2 Right child of 1 = 3 Level 3 : Left child of 2 = 4 Right child of 2 = null (-1) Left child of 3 = 5 Right child of 3 = 6 Level 4 : Left child of 4 = null (-1) Right child of 4 = 7 Left child of 5 = null (-1) Right child of 5 = null (-1) Left child of 6 = null (-1) Right child of 6 = null (-1) Level 5 : Left child of 7 = null (-1) Right child of 7 = null (-1) The first not-null node (of the previous level) is treated as the parent of the first two nodes of the current level. The second not-null node (of the previous level) is treated as the parent node for the next two nodes of the current level and so on. The input ends when all nodes at the last level are null (-1). Output Format : Print all the root to leaf path nodes. Note : You do not need to print anything, it has already been taken care of. Just implement the given function.
Build the adjacency list (tree). Start DFS from node 1. Maintain a consecutive cat count. If a node has a cat → increment; otherwise, reset to 0. If the count exceeds m → stop that path. If it is a leaf node → count it as a valid restaurant. Return the total count.
Flight System
Design a scalable system similar to a flight booking platform like MakeMyTrip, where users can: Search for flights between two cities View available flights with prices and timings Book tickets Make payments View booking history
Tip 1: Clearly define functional and non-functional requirements before designing the system. Tip 2: Break the system into scalable components like search, booking, and payment, and use caching and databases efficiently. Tip 3: Always consider edge cases like concurrent bookings, failures, and scalability while explaining your design.
Locking Concepts
What is lock granularity? What is intention locking?
DBMS
Find all users who have logged in for at least three consecutive days. SELECT user_id FROM ( SELECT user_id, login_date, DATE_SUB(login_date, INTERVAL ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY login_date) DAY) AS grp FROM logins ) t GROUP BY user_id, grp HAVING COUNT(*) >= 3;
DBMS
Given a table logins : | user_id | login_date | Find the longest consecutive login streak for each user.
Selection Perspective
I believe I was selected because of my confident approach and strong problem-solving skills during the interview. I was able to clearly explain my thought process and justify my answers. Additionally, whenever I was unsure about a question, I communicated it honestly instead of guessing or providing incorrect information. This demonstrated my authenticity and willingness to learn, which I believe created a positive impression on the interviewer.
Key Preparation Tips
Prepare DSA thoroughly.
Practice aptitude and puzzle-based questions.
Have at least two good projects on your resume.
Be prepared to explain your projects clearly.
Practice coding problems involving Arrays, Binary Search, DP and Recursion.
Prepare common HR questions such as Tell me about yourself and Who is your role model?
More Interview Experiences

Infosys
Specialist Programmer
Infosys Pvt Limited Interview Experience for Fresher Specialist Programmer, Dec 2025

Infosys
Specialist Programmer
Infosys Interview Experience for Fresher Specialist Programmer, Dec 2025

Infosys
System Engineer