Infosys technical interview questions for freshers, by role
Infosys technical interview questions scale with the role you are being considered for. System Engineer candidates are usually asked about one programming language, basic data structures, SQL, OOP and their project, while candidates for Digital Specialist Engineer or Specialist Programmer roles, often reached through HackWithInfy or a higher-level assessment, report harder problem solving: recursion, dynamic programming, graphs and code complexity. In every case, expect to explain code you wrote in the assessment or on your résumé.
By Evin JohnPublished 6 min read
Routes into an Infosys technical interview
Infosys recruits freshers through campus placements and off-campus drives. Two names come up again and again. InfyTQ is Infosys's learning and certification platform, and in several past years its certification has been a route to a fresher interview. HackWithInfy is a national coding competition, and strong performers have been offered interviews for higher roles. The roles candidates most often mention are System Engineer, Digital Specialist Engineer (DSE) and Specialist Programmer (SP). Eligibility, test patterns and which route leads to which role have changed over time, so confirm them on the official Infosys careers or InfyTQ pages for your year.
Once you reach the interview, many candidates describe a technical discussion followed by HR questions, sometimes in the same session. This page covers the technical side. Questions about relocation, training, shifts and your plans are in the Infosys HR interview guide.
How the questions change by role
| Role | Typical technical focus | How to prepare |
|---|---|---|
| System Engineer | One language, OOP, basic SQL, simple coding, your project | Depth in fundamentals and clean, tested short programs |
| Digital Specialist Engineer | Data structures, medium-level problems, complexity, some web or cloud basics | Daily problem practice and clear explanation of trade-offs |
| Specialist Programmer | Harder algorithms (DP, graphs, greedy), optimization, code from the contest | Contest-style practice and the ability to defend every line you submitted |
Treat the table as a guide to emphasis, not a promise. Any interviewer can ask a basic question in a senior-track interview, and some System Engineer panels go further than expected.
32 Infosys technical interview questions
Each question below is a common type, phrased by us. None is a confirmed Infosys question. Work through the group that matches your role first, then the rest.
Core language questions (all roles)
| Question | What it tests | What a strong answer shows |
|---|---|---|
| How does a HashMap store and find a key in Java? | Collections internals | Hashing to a bucket, equals for collisions, and why a bad hashCode slows lookups. |
| What is the difference between a list and a tuple in Python? | Mutability | Lists change, tuples do not, so tuples can be dictionary keys and are safer to share. |
| What does garbage collection do, and can you force it? | Memory management | Unreachable objects get reclaimed; you can request a collection but not rely on it. |
| What is the difference between == and equals() in Java, or == and is in Python? | Identity versus equality | Same object against same value, with a string example that surprises people. |
| What is a lambda or anonymous function, and where have you used one? | Modern language features | A sort key or a stream filter from your own code. |
| Checked versus unchecked exceptions: what is the difference? | Error design | What the compiler forces you to handle, and when each is appropriate. |
| What is the difference between a shallow copy and a deep copy? | Object references | Nested objects shared in one and duplicated in the other, with the bug that follows. |
Data structures and algorithms (DSE and SP focus)
- Find the longest substring without repeating characters. A sliding window with a map of last positions gives a linear solution. Explain why the left edge only moves forward.
- Detect whether a graph has a cycle. Depth-first search with a recursion stack for directed graphs, or union-find for undirected ones.
- Find the number of ways to climb n stairs taking one or two steps. Show the recurrence, then the bottom-up version that uses two variables.
- Return the k most frequent elements of an array. Count with a hash map, then use a heap of size k or bucket by frequency.
- Search a rotated sorted array. A modified binary search that decides which half is sorted at each step.
- Find the shortest path in an unweighted grid. Breadth-first search from the start, marking visited cells, and stopping at the target.
- Merge overlapping intervals. Sort by start, then extend or close the current interval as you scan.
- Longest common subsequence of two strings. A 2D table where each cell builds on its neighbors, and how to recover the subsequence itself.
- Check whether a binary tree is a valid binary search tree. Pass down allowed minimum and maximum values, not just a comparison with the parent.
function longestUnique(s) {
const last = new Map();
let left = 0, best = 0;
for (let right = 0; right < s.length; right++) {
const ch = s[right];
if (last.has(ch) && last.get(ch) >= left) left = last.get(ch) + 1;
last.set(ch, right);
best = Math.max(best, right - left + 1);
}
return best;
}
console.log(longestUnique("abcabcbb")); // 3
console.log(longestUnique("pwwkew")); // 3
console.log(longestUnique("")); // 0SQL and databases
| Question | What it tests | What a strong answer shows |
|---|---|---|
| What is the difference between WHERE and HAVING? | Query order | Rows filtered before grouping against groups filtered after. |
| Write a query to list departments with more than five employees. | GROUP BY | A correct GROUP BY with HAVING COUNT(*) > 5, and a word on the join to department names. |
| What is an index, and when can it make things slower? | Performance | Faster reads, slower writes and extra storage, and why a low-selectivity column gains little. |
| What is a view, and why would you use one? | Abstraction | A saved query that simplifies access or hides columns, with its update limits. |
| How would you rank employees by salary within each department? | Window functions | RANK or DENSE_RANK with PARTITION BY, and how ties are treated. |
Systems, web and OOP
| Question | What it tests | What a strong answer shows |
|---|---|---|
| Compare round-robin and priority CPU scheduling. | OS scheduling | Fair time slices against importance, and the starvation risk in the second. |
| What is a semaphore, and how is it different from a mutex? | Synchronization | A counter that allows several holders against a lock with one owner. |
| What happens in an HTTP request, and what do GET, POST, PUT and DELETE mean? | Web basics | The request and response shape, with methods mapped to actions on a resource. |
| What is REST, and what makes an API RESTful? | API design | Resources, stateless requests and standard methods, explained with a small example. |
| Explain SOLID briefly, with one principle you have applied. | Design principles | One real refactor from your own code, not five memorized definitions. |
| What is the difference between composition and inheritance? | Object design | Has-a against is-a, and why composition is often easier to change. |
Your project and contest code
- Walk me through the architecture of your project. Draw the parts and how data flows between them.
- What was the time complexity of your solution in the coding test? If you came through a contest, expect to be asked about the code you submitted.
- How did you test your project? Unit tests, manual checks or sample data, and what you missed.
- What would break first if your project had a thousand times more users? Point to the database, a slow endpoint or memory, and suggest a fix.
- Which part of the project did you write yourself? Be exact. Panels ask until they find the edge of your knowledge.
A fictional answer on problem complexity
Fictional example
- Interviewer
- Your contest solution for the interval problem passed. What was its complexity, and could you do better?
- Candidate
- I sorted the intervals by start time, which is O(n log n), then merged them in a single pass, which is O(n). So the total is O(n log n), dominated by the sort.
- Candidate
- If the inputs were already sorted, the merge alone would be linear. In general you cannot avoid the sort without knowing more about the data, for example if the start times fell in a small fixed range, where a counting approach could work.
- Interviewer
- Why did you use a list instead of a stack?
- Candidate
- I only ever compared with the last merged interval, so a list that I append to does the same job as a stack and is simpler to read.
Mistakes that sink Infosys technical interviews
- Not knowing your own submitted code. If an assessment or contest got you here, reread your solutions before the interview.
- Jumping straight to code. State the brute force, its complexity, then the better idea. Interviewers want to see the path.
- Ignoring the basics for a senior-track role. SP candidates still get asked about OOP and SQL.
- Claiming tools you only watched a video about. Cloud, React or machine learning on your résumé will be questioned.
- Silence when stuck. Think aloud, ask a clarifying question, try a small example by hand.
Preparation plan by role
- Confirm your route and roleCheck whether you are interviewing for System Engineer, DSE or SP, and read the official page for your drive.
- System Engineer track: two weeksRevise one language, OOP and SQL. Write twenty short programs on strings, arrays and numbers. Prepare a clear project walkthrough.
- DSE and SP tracks: four weeksAdd daily algorithm practice by pattern: sliding window, two pointers, binary search, BFS and DFS, dynamic programming, heaps. Explain complexity for every solution.
- Every track: mock interviewsDo at least two timed mocks where you solve a problem while talking, then answer theory questions.
Natively, an AI interview assistant for Mac and Windows, is useful in that mock phase. It can read a practice problem from a screenshot and outline an approach and complexity you can check against your own, transcribe the mock so you can see where your explanation drifted, and keep the notes for review. Add your résumé (Pro or the free trial) and it can help you rehearse questions about your own projects.
Questions people ask
What is asked in the Infosys technical interview?
Questions on your main programming language, OOP, SQL, operating systems and your project, plus coding problems. Candidates for Digital Specialist Engineer or Specialist Programmer roles report harder data structures and algorithm questions.
Is the Specialist Programmer interview harder than System Engineer?
Candidates generally report so: SP and DSE interviews lean on algorithms, complexity and contest-style problems, while System Engineer interviews focus more on fundamentals.
Do I need InfyTQ or HackWithInfy to get an Infosys interview?
They have been routes in past years, alongside campus and off-campus drives, but eligibility and routes change. Check the official Infosys careers pages for your year.
Will they ask about my assessment or contest code?
Often. Reread your submitted solutions and be ready to explain their logic and complexity.
Where to go next
Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.
Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.
