Autocoder

Infosys Interview Questions for Freshers

Last updated 2026-11-19

Infosys interviews for freshers lean on fundamentals plus careful reasoning: pseudocode tracing, a language you claim, DBMS, and a project you can defend. This page gives twelve practice questions in that style with worked answers, so you can compare your own wording.

For the process itself read how to crack the Infosys interview, and for coding practice see Infosys coding round questions.

FormatOnline assessment, technical interview, HR interview (commonly reported)
Harder trackSpecialist Programmer / Digital Specialist Engineer
Careers siteinfosys.com/careers

Infosys rounds as commonly reported

Infosys does not publish a fixed fresher process on one page, so treat this as the commonly reported shape. Sources we checked describe an online assessment (reasoning, verbal ability, aptitude and, for specialist roles, coding or pseudocode), then a technical interview that covers programming basics, DSA, DBMS and projects, and an HR interview about self-introduction, relocation, training readiness and goals. Specialist Programmer and Digital Specialist Engineer style roles add a harder coding component. Process details change between cycles, so read your invitation carefully.

Topics worth revising

Hiring status

For current news, read Infosys hiring, which lists sourced updates. Only the facts below are quoted here, each with its source, and they were checked on 19 November 2026.

Infosys Interview Questions for Freshers: questions with worked answers

  1. 1

    Why Infosys, and why a services company rather than a product company?

    easy

    Be honest and specific. A services firm gives you breadth: different clients, domains and stacks in your first few years, plus structured training. Name something real, such as the foundation training programme new joiners are commonly reported to go through, and say you want that base before specialising. Do not run down product companies. If you do want a product career later, you can say you see services as a place to build fundamentals first.

  2. 2

    Describe a time you had to learn something new quickly.

    medium

    Use STAR: situation, task, action, result. Example: for a college project you had to learn Spring Boot in two weeks, so you followed the official guide, built a small CRUD service on day three, then reworked your project in modules, and demoed it on time. Quantify the result (deadline met, marks, users) and end with what you would do differently. Infosys interviewers care that you can pick up tools, since freshers are moved across technologies.

  3. 3

    Compare Python list, tuple, set and dict.

    easy

    List: ordered, mutable, allows duplicates, O(1) append and O(n) insert at the front. Tuple: ordered and immutable, hashable if its items are, good for fixed records and dict keys. Set: unordered unique items, average O(1) membership. Dict: key-value pairs with unique hashable keys, insertion-ordered since Python 3.7, average O(1) lookup. A frequent follow-up is that lists cannot be dict keys because they are mutable and unhashable. See Python interview questions for more.

  4. 4

    Why are Strings immutable in Java, and what is the String pool?

    medium

    Once created, a String's contents never change; operations return new objects. This makes strings safe to share across threads, lets the hashCode be cached (useful as HashMap keys) and allows the JVM to keep a pool of literals. String a = "hi" and String b = "hi" refer to the same pooled object, so a == b is true, whereas new String("hi") creates a distinct heap object, so == is false while equals() is true. Use StringBuilder for repeated concatenation inside loops.

  5. 5

    Explain the join types with a query.

    medium

    INNER JOIN returns rows that match in both tables. LEFT JOIN keeps all rows of the left table, with NULLs where nothing matches; RIGHT JOIN mirrors it; FULL OUTER JOIN keeps both sides (not available in MySQL directly). CROSS JOIN gives the Cartesian product. A typical use is finding customers with no orders: LEFT JOIN orders and filter where the order key IS NULL. More in SQL joins interview questions.

    sql
    SELECT c.name
    FROM customers c
    LEFT JOIN orders o ON o.customer_id = c.id
    WHERE o.id IS NULL;
  6. 6

    What is a deadlock? Name the four necessary conditions.

    medium

    A deadlock is a state where each process in a set holds a resource and waits for one held by another, so none can proceed. The four Coffman conditions must all hold: mutual exclusion, hold and wait, no pre-emption, and circular wait. Breaking any one prevents deadlock; the practical fix is imposing a global order on lock acquisition, which removes circular wait. Detection (resource-allocation graph) and recovery by killing a process is the alternative. See operating systems interview questions.

  7. 7

    Checked versus unchecked exceptions in Java; what does finally do?

    medium

    Checked exceptions (IOException, SQLException) are verified at compile time: you must catch them or declare them with throws. Unchecked exceptions extend RuntimeException (NullPointerException, ArrayIndexOutOfBoundsException) and need not be declared. finally runs after try and catch whether or not an exception occurred, which is why it is used for releasing resources, though try-with-resources is the cleaner way. The one case it does not run is when the JVM exits, for example System.exit() or a crash. A return inside finally overrides one in try.

  8. 8

    DELETE, TRUNCATE and DROP: what is the difference?

    easy

    DELETE removes rows that match a WHERE clause, is a DML command, can be rolled back inside a transaction and fires row triggers. TRUNCATE removes all rows quickly, resets identity counters in most databases, and is DDL, with limited or no rollback depending on the engine. DROP removes the table itself, its structure, indexes and privileges. Use DELETE for selective removal, TRUNCATE to empty a staging table, and DROP when the table is no longer needed.

  9. 9

    Explain ACID with an example.

    medium

    Take a bank transfer of 500 from A to B. Atomicity: both the debit and credit happen or neither does. Consistency: constraints hold before and after, so total money is unchanged and no balance goes negative. Isolation: concurrent transfers behave as if run one after another; isolation levels trade this against speed. Durability: after commit the result survives a crash, via the write-ahead log. Interviewers may ask which property a rollback relies on (atomicity) and which a log relies on (durability).

  10. 10

    Trace this pseudocode: set x = 1; for i = 1 to 4: x = x * 2 + i; print x.

    easy

    Trace step by step. i=1: x = 1*2+1 = 3. i=2: x = 3*2+2 = 8. i=3: x = 8*2+3 = 19. i=4: x = 19*2+4 = 42. The output is 42. Infosys-style pseudocode questions are about careful tracing, not clever tricks, so write a small table of i and x as you go. Common slip: treating the loop as running 'less than 4' when the pseudocode says to, which would give 19.

  11. 11

    Why does quicksort have an O(n squared) worst case and how do you avoid it?

    hard

    If the pivot is always the smallest or largest element, as with a fixed first-element pivot on already sorted input, each partition removes only one element, giving n + (n-1) + ... = O(n squared). Avoid it with a random pivot or median-of-three, which makes the worst case very unlikely, or switch to heap sort after a depth limit (introsort). Average case is O(n log n) and space is O(log n) for recursion. Specialist Programmer style rounds like this complexity reasoning.

  12. 12

    What is the difference between == and equals(), and what is the hashCode contract?

    medium

    == compares references for objects (values for primitives); equals() compares logical content when a class overrides it. The contract: equal objects must return equal hashCodes, while unequal objects may share a hash code. If you override equals() without hashCode(), HashMap and HashSet will misbehave: two equal keys can land in different buckets and the lookup fails. Build hashCode from the same fields used in equals(), for example with Objects.hash().

Frequently asked questions

Is the Infosys interview difficult?

For the standard track it focuses on fundamentals and communication. Specialist roles expect stronger DSA and complexity reasoning.

What is asked in the Infosys HR round?

Self-introduction, willingness to relocate and train, strengths, goals and why Infosys. Prepare short, honest answers.

What is HackWithInfy?

A coding and hiring challenge run by Infosys; see the official page at infosys.com/careers/hackwithinfy for current rules, and Infosys hiring for sourced updates.

Do I need to know Python or Java for Infosys?

Know one properly. Interviewers usually ask about the language on your resume, so do not list one you cannot explain.

Sources

Related guides

More in Company Interview Questions

See all in this section