CoreHRx Jobs

Apply in one click, save jobs and take free mock tests.

Register free Log in
Hiring? Post jobs with CoreHRx
My account
user

View & update profile
Interview guide

Infosys Interview Questions and Answers: Hiring Process, Tests, Technical and HR

This guide is for engineering and MCA students in India preparing for Infosys campus and off-campus drives. It explains the hiring process as seen in recent drives, from registration and the online assessment to the technical and HR interview, and covers the HackWithInfy route to the higher Specialist Programmer and Digital Specialist Engineer roles. The questions are practice questions written by CoreHRx in the style of recent drives, not actual exam questions. They move from the process and common HR questions, through solved reasoning, maths, verbal and pseudocode samples and fresher technical basics, to harder coding, scenario and offer questions. Rules change every year, so always check the official notification for your batch.

  • 60 questions, 3 levels
  • Updated
  • CoreHRx Jobs

Practice questions written by CoreHRx in the style of recent Infosys drives. CoreHRx is not affiliated with or endorsed by Infosys, and these are not actual exam questions.

Infosys fresher hiring in recent drives

  • Roles: in recent drives, freshers have joined as Systems Engineer (Infosys reports call it System Engineering Trainee), Digital Specialist Engineer or Specialist Programmer. Check the official notification for the roles open to your batch.
  • Online assessment: candidates for the Systems Engineer track in recent drives report sections on reasoning, mathematical ability, verbal ability, pseudocode and puzzle solving.
  • Higher roles: in recent drives, Specialist Programmer and Digital Specialist Engineer have been filled through a coding-focused test or HackWithInfy, the Infosys national coding contest, followed by a deeper technical interview.
  • Interview: in recent drives, a technical and HR conversation, sometimes combined into one, covering your basics, your project and your attitude to work.
  • Training: Infosys reports that its campus hires go through a Foundation Program at the Global Education Center in Mysuru before they join projects; check the official notification for your batch.

How to prepare

  • Aptitude first: practise reasoning, arithmetic and verbal questions every day against a timer, and keep a notebook of the question types you get wrong.
  • Pseudocode: trace short programs on paper with a table of variables, including loops, recursion, modulus and bitwise operators.
  • Technical basics: revise OOP, DBMS and SQL, operating systems, networking and one programming language you can write without help.
  • Coding: for the higher roles, solve array, string, greedy and dynamic programming problems, and practise explaining your approach aloud.
  • HR: prepare short, true answers about yourself, your project, relocation, shifts and why Infosys, and keep your documents ready.

On the day

  • Before an online test, read the platform instructions and check your camera, microphone and internet connection well in advance.
  • Do not let one hard question eat your time; move on and come back to it if the test allows.
  • In the interview, think aloud, admit what you do not know, and connect your answers to your own project.
  • Trust only the official notification, your placement cell and official Infosys email for dates, results and offers.

Infosys interview questions: Easy questions

20 questions

1. Which roles does Infosys hire freshers for in recent drives?

In recent drives, engineering and MCA freshers have been hired into three main tracks. Systems Engineer (Infosys reports call it System Engineering Trainee) is the largest intake and suits candidates with sound basics. Digital Specialist Engineer and Specialist Programmer are higher tracks for strong coders, with a tougher coding test and a deeper technical interview. The roles open in a given drive, and their exact titles, can change from year to year, so check the official notification before you apply.

2. What does the online test for the Systems Engineer role cover?

In recent drives, candidates for the Systems Engineer track have reported an online assessment with sections on reasoning ability, mathematical ability, verbal ability, pseudocode and puzzle solving. Reasoning covers series, coding-decoding, arrangements and data sufficiency; maths covers arithmetic, number system and probability; verbal covers grammar, vocabulary and reading. Pseudocode asks you to trace short programs, and puzzles test step-by-step logic. The pattern changes between drives, so check the official notification for your batch.

3. How is the route to Specialist Programmer and Digital Specialist Engineer different?

In recent drives, these higher roles have been filled through a coding-focused assessment, either a separate test or the HackWithInfy contest, followed by a longer technical interview. The Infosys preparatory guidance for HackWithInfy describes problems ranging from easy ones on basic data structures, to medium ones often solved with greedy methods, to hard ones that often need dynamic programming. The interview goes deeper into algorithms and your projects. Check the official notification for the current route.

4. What is HackWithInfy, and how does it connect to Infosys hiring?

HackWithInfy is a national coding contest that Infosys runs for engineering students in India. In recent editions, the first round was an individual online coding test on the Infosys assessment platform, and the top performers moved on to a team hackathon finale. Infosys states that participants can get pre-placement interview opportunities for the Specialist Programmer role and other roles in its specialised units. Eligible batches and dates change every year, so check the official HackWithInfy page before you plan around it.

5. What are the basic eligibility rules for Infosys fresher drives?

In recent drives, eligibility has usually covered students graduating in a specified year from B.E., B.Tech, M.E., M.Tech, MCA and some M.Sc programmes. Drives commonly set a minimum academic record across Class 10, Class 12 and graduation, a limit on gaps in education, and a rule that no backlogs remain at the time of joining. The exact marks, gap rules and eligible branches differ by drive and by year, so check the official notification or ask your placement cell before you register.

6. How do you register for an Infosys drive on campus and off campus?

On campus, your training and placement cell shares the drive details and the registration link, and you apply through the list it sends to the company. Off campus, openings for freshers appear on the official Infosys careers portal: create a profile, fill in your academic details exactly as on your mark sheets, and track the status there. In recent drives, test links and interview slots arrived by email, so watch your spam folder too. Rely only on the official notification and official Infosys email domains.

7. How do you register for HackWithInfy?

According to the official terms for recent editions, registration happened through the college placement officer, followed by an Infosys survey form, and there was no fee at any stage. Participants had to be residents of India studying programmes such as B.E., B.Tech, M.E., M.Tech, MCA or an integrated M.Sc, graduating in the batches named that year. Ask your placement officer early, because the registration window is short. Check the official HackWithInfy page for the current batch, dates and rules.

8. What happens after you clear the online assessment?

In recent drives, shortlisted candidates moved to an interview, often a single conversation covering both technical and HR questions, held online or at a campus. For the higher roles, expect a deeper technical round focused on coding and projects. After the interviews, results come through the placement cell or by email, followed by an offer letter and document verification. The number of rounds and their order vary between drives, so check the official notification and read every email from the recruitment team.

9. Which documents should you keep ready for the interview and onboarding?

Keep originals and scanned copies of your Class 10 and 12 mark sheets, every semester mark sheet, your provisional or degree certificate, a government photo ID such as Aadhaar or PAN, passport-size photos and an updated resume. If you have a gap year, keep a short note and any proof of what you did. In recent drives, candidates were also asked to upload documents on an onboarding portal. Make sure your name and date of birth match across documents, and check the official notification for the exact list.

10. How can you tell a genuine Infosys offer from a fake one?

Genuine fresher hiring runs through your placement cell or the official Infosys careers portal, and the official HackWithInfy terms for recent editions state that there was no fee. Be suspicious of anyone who asks for money for training, a laptop, registration or a guaranteed offer, of offers made without any test or interview, and of emails from free mail services. Verify the sender domain, never share OTPs or bank details, and report suspected fraud to your placement cell and the national cyber crime portal.

11. What is the Foundation Program at Mysuru?

Infosys reports that its campus hires go through an in-house Foundation Program at the Global Education Center in Mysuru before they join projects. It is a residential programme covering programming, a technology stream and professional skills, with regular assessments along the way. Treat those assessments as seriously as the hiring test, because they shape your start. In recent drives, the training location and reporting details were confirmed in the joining communication, so check the official notification for your batch.

12. How should you answer "Tell me about yourself" in an Infosys interview?

Keep it to about a minute and follow a simple order: who you are, what you studied, what you built, and why this role. For example: "I am a final-year ECE student from Coimbatore. I enjoy programming, solved problems on coding platforms through college, and built an attendance app in Java with a MySQL database for my project. I want to start my career at Infosys because of its training and the range of projects." Skip family details unless asked, and make every line lead to something you can explain.

13. Why do you want to join Infosys?

Give reasons that are specific and true for you. Good points are the structured training for freshers at Mysuru, the chance to work on projects for clients across many industries and countries, and the learning platforms open to employees. Link them to your goal: "I want a strong foundation in software engineering, and a company that trains freshers properly and moves them onto real client projects suits me." Avoid saying only that it is a big brand or that a friend works there; that sounds as if you did no research.

14. Are you willing to relocate to any Infosys location in India?

Answer honestly, but remember that service companies place freshers where projects need them. A good answer: "Yes, I am open to relocating. I want to learn the work first, and I can adjust to any city." If you have a real constraint, such as a parent who needs care, mention it briefly and calmly, and say you are flexible otherwise. In recent drives, the work location was decided after training, so do not insist on one city at the interview. Location policies change, so check the official notification.

15. Are you comfortable working in shifts or on weekends when a project needs it?

Most freshers work regular day hours, but some projects support clients in other time zones, and production support or releases can mean early, late or weekend work. Show that you understand this: "Yes. I know some projects follow the client's time zone, and I am fine with shifts when the work needs it. I will plan my routine around it." If you have a genuine limitation, say so plainly. Do not promise something you cannot keep, because shift needs are decided by the project you join.

16. What do you know about Infosys?

Show that you have read beyond the name. Infosys is an Indian multinational in IT services and consulting, founded in 1981 by N. R. Narayana Murthy and six co-founders and headquartered in Bengaluru. It works for clients in banking, retail, telecom, manufacturing and more, and its group also builds software products such as the Finacle banking platform. Before the interview, read recent news, results and the careers pages on the official site, and mention one recent item that genuinely interests you.

17. What are your strengths and weaknesses?

Pick one strength with proof and one real weakness with a fix. Strength: "I stay with a problem until I solve it; during my project I spent two evenings tracing a database error and found a wrong join." Weakness: "I used to hesitate to speak in groups, so I joined the college debate club and now present at every project review." Avoid fake weaknesses such as working too hard, and avoid ones that clash with the job, such as disliking new tools. Keep both answers short and honest.

18. Where do you see yourself in five years?

Show ambition that fits the company. A good answer: "I want to be a dependable engineer who knows one technology deeply, has handled real client work, and can guide newer team members. I would also like to earn a certification in my area." Do not name a different company, a plan to leave soon for higher studies, or a management title you cannot explain. Interviewers want to know that you will stay, learn and grow, so describe a path inside the organisation and the skills you will build.

19. You studied a non-CS branch. Why do you want an IT job?

In recent drives, Infosys has hired from many engineering branches, so this question comes up often. Be positive about your branch and specific about your interest in software: "I enjoyed the C programming course in my first year, kept coding on my own, and used Python to analyse test data in my mechanical project. I want to build software full time." Back it with proof such as a certificate, a small project or a coding profile. Never say that your core branch had no jobs.

20. What should you ask when the interviewer says "Do you have any questions for us?"

Ask one or two short, sincere questions about the work, not about pay or leave. Good options: "What technologies do freshers usually work on after training?", "What does a good first year look like in this role?" or "How can I prepare before joining?" These show interest and a learning attitude. Avoid questions already answered on the official careers pages, and never ask whether you have been selected. Thank the interviewer at the end and keep your tone calm and friendly.

Ready to check yourself? Take the free Infosys mock test

Infosys interview questions: Medium questions

20 questions

21. Solved reasoning sample: find the next number in 3, 8, 15, 24, 35, ?

Check the differences first: 8 - 3 = 5, 15 - 8 = 7, 24 - 15 = 9 and 35 - 24 = 11. They rise by 2 each time, so the next difference is 13 and the answer is 35 + 13 = 48. You can confirm it another way: the terms are 2^2 - 1, 3^2 - 1, 4^2 - 1, 5^2 - 1 and 6^2 - 1, so the next is 7^2 - 1 = 48. In recent drives, series questions have mixed squares, cubes, primes and alternating patterns, so try differences first, then squares and cubes.

22. Solved reasoning sample: if COLD is written as DPME, how is WARM written?

Compare each letter with its code: C to D, O to P, L to M and D to E. Every letter moves one place forward in the alphabet. Apply the same rule to WARM: W becomes X, A becomes B, R becomes S and M becomes N, so the code is XBSN. Learn the positions of letters (A = 1 up to Z = 26) and their opposites (A with Z, B with Y) so you can spot shifts, reversals and mirror codes quickly. Write the positions above each letter when the rule is not obvious.

23. Solved reasoning sample: pointing to a man, Riya says, "His mother is the only daughter of my mother." How is the man related to Riya?

Start from the end of the sentence. The only daughter of Riya's mother is Riya herself, since Riya is a woman and her mother has just one daughter. So the man's mother is Riya, and the man is Riya's son. In blood relation questions, draw a small family tree: mark males and females differently, use horizontal lines for siblings and vertical lines for parent and child. Watch words such as only, my and her own, because they usually decide the answer.

24. Solved maths sample: a shopkeeper marks a phone 25% above cost and gives a 12% discount. What is the profit percent?

Take the cost price as 100, which makes percentages easy. The marked price is 125. A 12% discount on 125 is 15, so the selling price is 110. The profit is 110 - 100 = 10 on a cost of 100, which is 10%. The shortcut for a markup of m% and a discount of d% is m - d - md/100 = 25 - 12 - 3 = 10%. Remember that the discount is taken on the marked price and the profit on the cost price; mixing up these two bases is the most common mistake here.

25. Solved maths sample: A and B together finish a task in 12 days, and A alone takes 20 days. How long does B take alone?

Take the work as the LCM of 12 and 20, which is 60 units. Together they do 60/12 = 5 units a day, and A alone does 60/20 = 3 units a day, so B does 5 - 3 = 2 units a day. B alone needs 60/2 = 30 days. With fractions, 1/12 - 1/20 = 5/60 - 3/60 = 2/60 = 1/30, which gives the same answer. The unit method avoids fractions, is faster under time pressure and extends easily to three workers or to pipes that fill and empty a tank.

26. Solved maths sample: a bag has 4 red and 6 blue balls. Two are drawn at random. What is the probability that both are red?

The number of ways to choose 2 balls from 10 is 10C2 = 45, and the number of ways to choose 2 red balls from 4 is 4C2 = 6. So the probability is 6/45 = 2/15. You can also multiply step by step: the first ball is red with probability 4/10, and the second is red with probability 3/9 once one red ball is gone, giving 4/10 x 3/9 = 12/90 = 2/15. Both methods agree, which is a quick check. Drawing without replacement changes the second probability.

27. Solved verbal sample: find the error in "Each of the students have submitted the assignment on time."

The subject is "Each", which is singular, so the verb must be "has", not "have": "Each of the students has submitted the assignment on time." The words "of the students" sit between the subject and the verb and pull your ear towards the plural. The same rule applies to every, either, neither and one of. In recent drives, verbal sections have included error spotting, sentence completion, vocabulary and reading passages, so revise agreement, tenses and prepositions first.

28. Solved verbal sample: how do you put a jumbled paragraph in order quickly?

Find the opening sentence first: it introduces the topic and does not start with a pronoun such as it, they or this, or with a linking word such as however or therefore. Next, find pairs that must go together, such as a sentence naming a person followed by one that says he or she. Linking words show the flow: however signals a contrast, and as a result follows a cause. Build the order from these fixed pairs, then check it against the options instead of testing every option from scratch.

29. Solved pseudocode sample: what does this loop print?

Trace it in a table with columns for a, b and c. Start: a = 5 and c = 0. Pass one: c = 3, a = 3. Pass two: c = 6, a = 1. Pass three: c = 9, a = -1. Now a > 0 is false, so the loop stops. The print adds c and a: 9 + (-1) = 8. The trap is forgetting that a went negative before the print, which gives the wrong answer 9. In recent drives, pseudocode questions have used loops, nested conditions, modulus and bitwise operators, so always trace with a table.

Example
Integer a = 5, b = 3, c = 0
while (a > 0)
    c = c + b
    a = a - 2
end while
print c + a

30. Solved pseudocode sample: what does this recursive function return for 7?

Expand the calls one level at a time. fun(7) = 7 + fun(5), fun(5) = 5 + fun(3), fun(3) = 3 + fun(1), and fun(1) hits the base case and returns 1. Now add back up: 3 + 1 = 4, then 5 + 4 = 9, then 7 + 9 = 16, so it prints 16. For an even start such as fun(6), the chain is 6, 4 and 2 and then fun(0), which also returns 1, so the answer is 13. Write each call on its own line and fill in the returns from the bottom up so you never lose track.

Example
Integer fun(Integer n)
    if (n <= 1)
        return 1
    end if
    return n + fun(n - 2)
end function

print fun(7)

31. Solved puzzle sample: eight coins look identical but one is heavier. How many weighings on a balance do you need to find it?

Two weighings are enough. Split the coins into groups of 3, 3 and 2, and weigh the two groups of 3. If one side is heavier, the heavy coin is among those 3: weigh any two of them, and either one side sinks or, if they balance, the third coin is the heavy one. If the first weighing balances, the heavy coin is among the remaining 2, and one more weighing finds it. Puzzle sections in recent drives have tested this kind of stepwise logic, so practise splitting cases and checking every branch.

32. What are the four pillars of object-oriented programming?

Encapsulation keeps data and the methods that use it inside a class and hides the data behind access control, such as private fields with public getters. Abstraction shows what an object does, not how, for example through an interface. Inheritance lets one class reuse another, such as SavingsAccount extending Account. Polymorphism lets one call behave differently by object type: overloading picks a method at compile time by its parameters, and overriding picks the subclass version at run time.

33. What is normalisation in DBMS? Explain 1NF, 2NF and 3NF briefly.

Normalisation organises tables to remove repeated data and update anomalies. 1NF: every column holds a single value, so no lists such as several phone numbers in one cell. 2NF: the table is in 1NF and every non-key column depends on the whole primary key, not on part of a composite key. 3NF: the table is in 2NF and no non-key column depends on another non-key column; for example, keep the department name in a department table, not repeated against every employee.

34. Write an SQL query to find the second highest salary in an employee table.

The query takes the highest salary that is below the overall maximum: the inner query finds the top salary, and the outer query finds the largest value under it, so ties at the top are handled correctly. In MySQL you can also write SELECT DISTINCT salary FROM employee ORDER BY salary DESC LIMIT 1 OFFSET 1. For the Nth highest, interviewers like the DENSE_RANK() window function. Be ready to say what happens when the table has only one distinct salary: the first query returns NULL.

Example
SELECT MAX(salary) AS second_highest
FROM employee
WHERE salary < (SELECT MAX(salary) FROM employee);

35. What are the main types of SQL joins?

An INNER JOIN returns only rows that match in both tables, such as employees who have a department. A LEFT JOIN returns every row from the left table and the matching rows from the right, with NULLs where there is no match, so it also shows employees without a department. A RIGHT JOIN does the reverse, and a FULL OUTER JOIN keeps unmatched rows from both sides; MySQL has no FULL JOIN, so it is written as a LEFT JOIN combined with a RIGHT JOIN using UNION. A self join links a table to itself, such as employees and their managers.

36. What is the difference between a process and a thread?

A process is a program in execution with its own memory space, files and resources. A thread is a smaller unit of execution inside a process; threads of the same process share its memory and resources, but each has its own stack and registers. So creating and switching threads is cheaper, but a bug in one thread can corrupt data that others use. A browser is a good example: each tab may run as a separate process for safety, while one tab uses several threads for loading, rendering and scripts.

37. What is a deadlock, and what are the four conditions for it?

A deadlock happens when two or more processes each wait for a resource held by another, so none can continue. It needs four conditions at once: mutual exclusion (one process at a time can use a resource), hold and wait (a process holds one resource while waiting for another), no preemption (resources cannot be taken away) and circular wait (a closed chain of waiting). Breaking any one condition prevents deadlock, for example by always requesting resources in a fixed order. The Banker's algorithm is a classic avoidance method.

38. What is the difference between TCP and UDP?

TCP is connection-oriented: it sets up a connection with a three-way handshake, numbers the data, resends lost packets and delivers them in order, so it is reliable but has more overhead. UDP sends independent datagrams with no connection, no acknowledgement and no ordering, so it is faster but can lose data. Web pages, email and file transfer use TCP; video calls, online games and most DNS lookups use UDP, where speed matters more than a few lost packets. Both work at the transport layer.

39. In Java, what is the difference between JDK, JRE and JVM?

The JVM (Java Virtual Machine) runs Java bytecode and is what makes Java platform independent: the same .class file runs on any system that has a JVM. The JRE (Java Runtime Environment) is the JVM plus the core libraries needed to run programs. The JDK (Java Development Kit) adds development tools such as the javac compiler and a debugger. In short, you need the JDK to write and compile code and a runtime to run it. If your main language is Python or C, prepare the matching basics for that language instead.

40. How should you explain your final-year project in the interview?

Use a short structure: the problem, your solution, your own part, the technology and the result. For example: "Our project predicts crop yield from soil and weather data for farmers in our district. I cleaned the data and built the model in Python, and my teammate built the web page. We tested it on two seasons of local data." Be ready to draw the architecture, explain why you chose each tool and say what you would improve. Interviewers probe your own contribution, so never claim parts you did not do.

Ready to check yourself? Take the free Infosys mock test

Infosys interview questions: Hard questions

20 questions

41. Coding question: how do you find the length of the longest substring without repeating characters?

Use a sliding window with a map of the last index of each character. Move the right end one step at a time. If the current character was already seen inside the window, jump the left end to just after its last position. After each step, update the best length. For "abcabcbb" the answer is 3 ("abc"), and for "pwwkew" it is 3 ("wke"). It runs in O(n) time with extra space for the distinct characters, compared with O(n^2) or worse for checking every substring. Explain why the left end never moves back.

Example
def longest_unique(s):
    last = {}
    start = best = 0
    for i, ch in enumerate(s):
        if ch in last and last[ch] >= start:
            start = last[ch] + 1
        last[ch] = i
        best = max(best, i - start + 1)
    return best

42. Coding question: what is the greedy way to pick the largest number of non-overlapping meetings?

Sort the meetings by end time, then walk through them and take every meeting that starts at or after the end of the last one you took. Picking the meeting that finishes earliest always leaves the most room for the rest, which is why this greedy choice is safe; an exchange argument proves it. Sorting costs O(n log n) and the scan O(n). Sorting by start time or by length looks natural but fails; show a counter-example, such as one long early meeting that blocks two short ones.

Example
def max_meetings(meetings):
    # meetings: list of (start, end), times are non-negative
    meetings.sort(key=lambda m: m[1])   # earliest finish first
    count, last_end = 0, -1
    for start, end in meetings:
        if start >= last_end:
            count += 1
            last_end = end
    return count

43. Coding question: how do you find the minimum number of coins needed to make an amount?

Greedy fails here: with coins 1, 3 and 4, greedy makes 6 as 4 + 1 + 1, which is three coins, but 3 + 3 uses two. Use dynamic programming instead. Let dp[a] be the fewest coins for amount a, with dp[0] = 0. For each amount, try every coin c not larger than a and keep the smallest dp[a - c] + 1. Return -1 if the amount cannot be made. Time is O(amount x number of coins) and space is O(amount). A common follow-up asks for the number of ways to make the amount instead.

Example
def min_coins(coins, amount):
    INF = amount + 1
    dp = [0] + [INF] * amount
    for a in range(1, amount + 1):
        for c in coins:
            if c <= a:
                dp[a] = min(dp[a], dp[a - c] + 1)
    return dp[amount] if dp[amount] != INF else -1

44. Solved pseudocode sample: what do these XOR, AND and OR lines print?

The three XOR lines swap the values without a temporary variable. In binary, x = 1100 and y = 1010. First x becomes 1100 XOR 1010 = 0110, which is 6. Then y = 0110 XOR 1010 = 1100, which is 12. Then x = 0110 XOR 1100 = 1010, which is 10. So the first print shows 10 and 12. Next, 10 AND 12 is 1010 AND 1100 = 1000, which is 8, and 10 OR 12 is 1110, which is 14. In recent drives, pseudocode has used bitwise operators often, so practise converting small numbers to binary.

Example
Integer x = 12, y = 10
x = x ^ y
y = x ^ y
x = x ^ y
print x, y
print (x & y), (x | y)

45. Solved pseudocode sample: what does this nested loop print for n = 8, and what is its time complexity?

For a given i, j doubles from 1 until it passes i, so the inner loop runs floor(log2 i) + 1 times. For n = 8, the counts for i = 1 to 8 are 1, 2, 2, 3, 3, 3, 3 and 4, so it prints 21. Over all values of i, the total grows as n log n, so the time complexity is O(n log n), not O(n^2), even though the loops are nested. The lesson: do not judge complexity by counting loops; look at how each loop variable changes. Doubling or halving a variable gives a log factor.

Example
Integer count = 0
for i = 1 to n
    j = 1
    while (j <= i)
        count = count + 1
        j = j * 2
    end while
end for
print count

46. Coding question: how do you check whether a string of brackets is balanced?

Use a stack. Push every opening bracket. For a closing bracket, the stack must not be empty and its top must be the matching opener; pop it, or else the string is unbalanced. At the end the stack must be empty, otherwise some opener was never closed. So "{[()]}" is balanced, while "([)]" fails because the square bracket closes while a round one is still open on top. The check runs in O(n) time and O(n) space in the worst case. A follow-up may ask you to return the position of the first wrong bracket.

Example
def balanced(s):
    pairs = {')': '(', ']': '[', '}': '{'}
    stack = []
    for ch in s:
        if ch in '([{':
            stack.append(ch)
        elif ch in pairs:
            if not stack or stack.pop() != pairs[ch]:
                return False
    return not stack

47. What happens when you type a website address in the browser and press Enter?

The browser checks its cache, then asks DNS to turn the domain name into an IP address. It opens a TCP connection to that server and, for an https address, performs a TLS handshake to set up encryption. It sends an HTTP request; a web server or load balancer passes it to the application, which may query a database and returns an HTML response. The browser parses the HTML, fetches the CSS, scripts and images, builds the page and renders it. Mention caching and CDNs if the interviewer wants more depth.

48. Scenario: the night before a release, you find a bug in code your senior wrote. What do you do?

Do not fix it silently and do not hide it. First confirm the bug with a clear test case and note its impact: does it break a key flow or only a rare edge case? Then tell your senior or lead at once, privately and politely, with the steps to reproduce it. Offer a fix if you have one, and let the lead decide whether to fix it now, release with a known issue or delay. This shows ownership, respect for the team and honesty, which interviewers value far more than late-night heroics.

49. Scenario: a client asks you directly for a change that is outside the agreed scope. How do you respond?

Stay polite and positive, but do not commit on your own. Note the request clearly, thank the client, and say you will discuss it with your team lead and come back with a timeline. Then pass it to your lead, who handles scope, effort and any change request through the agreed process. Agreeing directly can upset the plan, hurt quality and cause billing disputes. As a fresher, your job is to be helpful and transparent while following the escalation path, and to update the client once the lead decides.

50. How would you handle a disagreement with your team lead about a technical approach?

Raise it privately, with facts rather than opinions. Explain your concern, show evidence such as a small test, a benchmark or documentation, and ask what you might be missing, since the lead may know constraints you do not. If the lead still prefers the original plan, accept it, do the work well and keep a short note of the risk you raised. Never argue in front of the client or complain to others. Interviewers want to see that you can speak up respectfully and still commit to the team's decision.

51. You are placed on a technology or a testing role you did not choose. How do you respond?

Show that you are flexible and keen to learn. Every project builds useful skills: testing teaches you how software breaks, and support work teaches you how real systems run. Explain how you would ramp up quickly through internal courses, documentation and questions to seniors. You can add that you would like to build skills in your preferred area alongside, and discuss a move after you have delivered well. Allocation follows business needs, so a positive, practical answer works far better than a complaint.

52. Scenario: your change breaks a shared test environment that the whole team uses. What do you do?

Own it quickly. Tell your lead what happened, what is affected and what you have already done to contain it, such as rolling back your change. Help fix it, then find the root cause and suggest a step that prevents a repeat, such as a checklist or a code review before deployment. Do not blame tools or teammates, and do not stay quiet hoping nobody notices. Interviewers ask this to test honesty and calm under pressure; a mistake handled well builds trust, while a hidden one destroys it.

53. Tell me about a time you worked in a team that had a conflict.

Use the STAR method: situation, task, action and result. For example: "In our final-year project, two members wanted different frameworks and work stopped for a week. I suggested we list the requirements, build a small prototype in each and compare them. We chose React because more of the team knew it, and we finished on time." Keep the focus on what you did, stay fair to the others, and end with the result and what you learned. Prepare two or three such stories from college, internships or events.

54. What are your salary expectations?

In fresher drives, the offer for each role is usually set in advance, so do not quote a number. A good answer: "I understand the compensation for this role follows the company standard for freshers, and I am comfortable with it. My priority now is learning and a strong start." If pressed, say you expect what is normal for the role and the industry at the fresher level. In recent drives, offer details came in the official communication, so check the official notification rather than relying on rumours.

55. You have an offer from another company. Would you still join Infosys?

Be honest without sounding as if you are bargaining. If you prefer Infosys, say why: "Yes. I have another offer, but I prefer Infosys for its training for freshers and the range of client projects, and that matters more to me." Do not quote the other company's pay or try to start a bidding war, because fresher offers are rarely negotiated one by one. Also check your college placement policy, since many colleges limit how many offers a student may take. Never accept an offer you plan to drop.

56. Your joining date is delayed after you get the offer. What should you do?

Delays have happened in some recent drives, so plan for one calmly. Keep checking the official communication and the onboarding portal, complete any document upload or pre-joining learning you are asked for, and use the time to strengthen your coding, SQL and one language. Never pay anyone who promises to speed up your joining. You may write politely to the official recruitment contact for an update, but avoid repeated messages. If you are weighing another offer, read both letters carefully before deciding.

57. You applied for a higher role but are offered Systems Engineer. Would you accept?

Answer positively and practically. Systems Engineer is a solid entry point with full training, and strong performers grow from it. You could say: "Yes. I would rather start, learn and prove myself, and I will keep building my coding skills for more specialised work later." It is fair to ask how employees move into specialised roles over time, but do not assume a fixed path, since such options change; check the official careers pages or ask HR. Avoid sounding disappointed, which suggests you may leave early.

58. How do you explain a backlog or a low score in one semester?

Be brief and honest, then show recovery. For example: "In my third semester I had a backlog in Mathematics because I fell ill before the exam. I cleared it in the next attempt, and my scores improved in the later semesters." Do not blame teachers or the university, and do not hide it, because your mark sheets show it anyway. Keep proof of clearance ready. Backlog rules differ between drives, so check the official notification to be sure you qualify before you apply.

59. How do you explain a gap year in your education?

State the reason in one line and show what you did with the time. Valid reasons include illness, family responsibilities or preparing for an entrance exam. For example: "I took a year to prepare for an engineering entrance exam. I did not get the college I wanted, but my maths improved and that helped me in my degree." Keep a supporting document if you have one, such as a medical certificate. Gap rules differ between drives, so check the official notification before you register, and give the same reason on every form.

60. What if the interviewer asks about a resume skill you do not know well?

Say plainly how much you know: "I have used it only at a basic level in one assignment; I can explain what I did, but I have not used its advanced features." Then answer the parts you do know. Never bluff, because follow-up questions expose it fast and damage trust in the rest of your resume. Before the interview, remove or downgrade any skill you cannot discuss for a few minutes, and revise every tool and project you have listed. A shorter, honest resume beats a long one you cannot defend.

Practice questions for November 2026

New every month

3 questions from the Infosys mock test, the way they appear in it. A new set comes on the 1st of every month. Pick your answer, then open it.

  1. EasyLogical Reasoning

    5 friends B, C, F, M and S sit in a row facing north. M sits immediately to the left of F. Exactly one person sits between F and S. B does not sit next to S. C sits immediately to the left of B. Who sits at the extreme left end?

    • C
    • B
    • S
    • F
    Show the answer

    Answer: S. Only one arrangement fits every clue: S M F C B (left to right). So the answer is S.

  2. MediumMathematical Ability

    The HCF of two numbers is 16 and their LCM is 240. If one number is 48, what is the other?

    • 80
    • 15
    • 48
    • 96
    Show the answer

    Answer: 80. HCF x LCM = product of the numbers. Other = 16 x 240/48 = 80.

  3. HardPuzzle Solving

    Gurpreet is taller than Divya. Sneha is taller than Kavya. Divya is taller than Sanjay. Kavya is taller than Gurpreet. Asha is taller than Sneha. Who is the shortest?

    • Divya
    • Asha
    • Sneha
    • Sanjay
    Show the answer

    Answer: Sanjay. Put the facts in one chain from top to bottom: Asha > Sneha > Kavya > Gurpreet > Divya > Sanjay. So the answer is Sanjay.

Take the full Infosys mock test

Ready to apply?

Browse the open jobs on CoreHRx. Create a free profile once and apply with it.