Autocoder

Nagarro interview questions and answers

Last updated 2026-11-19

Nagarro is a digital engineering company, and its fresher interviews are commonly described as more technical than a typical services-company process: a coding test with real problem-solving, then interviews on data structures, object-oriented design and the languages on your resume. Candidates also report that interviewers ask them to think aloud.

This page works through questions of that kind with worked answers. Nagarro has not published a fixed fresher process that we can cite, so the round structure below is commonly reported. The coding stage is covered in Nagarro coding round questions.

Typical rolesAssociate engineer, associate staff engineer
Rounds (commonly reported)Online coding test, technical interviews, HR interview
Frequent topicsDSA, OOP, Java or similar, design patterns, REST, projects

Rounds as commonly reported

Candidates describe an online test with aptitude and programming questions, then one or two technical interviews and an HR round. The test is often described as harder than a typical services-company test, with medium-level data-structure problems. In the technical interview you may be asked to code a medium problem live, explain trade-offs, then discuss object-oriented design.

Because Nagarro builds digital products for clients, interviewers value code you can explain: why this data structure, what the complexity is and how you would test it. Silent coding is a weaker signal than talking through your approach.

What to rehearse

Hiring status

There is no Nagarro hiring page on this site and we hold no sourced Nagarro statement on fresher numbers, dates or packages, so none are quoted. Check Nagarro's own careers site for current roles and the test pattern.

Nagarro interview questions and answers: questions with worked answers

  1. 1

    Explain the SOLID principles briefly.

    medium

    Single responsibility: a class should have one reason to change. Open-closed: extend behaviour without modifying existing code. Liskov substitution: a subclass must be usable wherever its parent is expected without breaking correctness. Interface segregation: prefer several small interfaces over one large one. Dependency inversion: depend on abstractions, not concrete classes. Give a quick example, such as injecting a PaymentGateway interface rather than constructing a specific gateway inside the service.

  2. 2

    What is the Singleton pattern, and how do you make it thread safe in Java?

    medium

    Singleton ensures a class has exactly one instance with a global access point. A thread-safe form is an enum singleton, or a private constructor with a static holder class that loads the instance lazily and safely on first use. Double-checked locking needs a volatile field to be correct. Mention that singletons hamper testing and hide dependencies, so use them sparingly.

    java
    public class Config {
        private Config() {}
        private static class Holder {
            static final Config INSTANCE = new Config();
        }
        public static Config getInstance() {
            return Holder.INSTANCE;
        }
    }
  3. 3

    Difference between composition and inheritance? When do you prefer composition?

    medium

    Inheritance models an is-a relationship and reuses a parent through subclassing; composition models has-a by holding references to other objects and delegating. Prefer composition when behaviour varies at run time, to avoid deep fragile hierarchies and the tight coupling of subclasses to parent internals. Example: a Car has an Engine that can be swapped, rather than a Car being a kind of Engine.

  4. 4

    How does ConcurrentHashMap differ from HashMap and Hashtable?

    medium

    HashMap is not thread safe and can corrupt under concurrent writes. Hashtable is thread safe by synchronising every method on one lock, which scales poorly. ConcurrentHashMap allows concurrent reads and fine-grained concurrent writes (per-bin locking and compare-and-swap in modern versions), and does not permit null keys or values. Use it for shared maps accessed by many threads, and use atomic methods such as computeIfAbsent for compound actions.

  5. 5

    What is the difference between an abstract class and an interface, and what changed in Java 8?

    easy

    An abstract class can hold state and constructors and a class extends only one. An interface defines a contract and a class can implement many. Since Java 8 interfaces can contain default and static methods, which lets libraries add methods without breaking implementers, blurring the gap, but interfaces still have no instance fields. Use abstract classes for shared state and interfaces for capabilities.

  6. 6

    Explain the difference between a process and a thread, and how threads communicate in Java.

    medium

    Processes have separate memory; threads in one process share the heap and communicate through shared objects, which needs synchronisation (synchronized, locks, volatile, atomics) or higher-level tools such as BlockingQueue. wait and notify coordinate on a monitor, and ExecutorService manages thread pools. A shared mutable counter without synchronisation is the standard race-condition example.

  7. 7

    Design a URL shortener at a basic level.

    hard

    Accept a long URL, generate a unique short key (for example a base-62 encoding of an auto-increment ID, or a random key checked for collisions), store the mapping in a database or key-value store, and redirect with an HTTP 301 or 302 on lookup. Add caching for hot keys, an index on the key, expiry if required and rate limiting. Discuss trade-offs: sequential IDs are predictable, random keys need collision handling.

  8. 8

    What is the time complexity of common operations on ArrayList, HashMap and TreeMap?

    easy

    ArrayList: index access O(1), append amortised O(1), insert or remove in the middle O(n), search O(n). HashMap: put, get and remove average O(1), worst case O(log n) with tree bins in Java 8. TreeMap, a red-black tree: put, get and remove O(log n) and keys are kept sorted, so range queries are possible. Choose TreeMap only when you need sorted order.

  9. 9

    What is REST, and what makes an API RESTful?

    easy

    REST is an architectural style where resources are identified by URLs and manipulated with standard HTTP methods (GET, POST, PUT, PATCH, DELETE). A RESTful API is stateless, uses correct status codes, returns representations such as JSON, and uses nouns in paths (/orders/42) rather than verbs. Idempotency matters: retrying a PUT or DELETE is safe, retrying a POST may duplicate.

  10. 10

    You are given a slow SQL query. How do you investigate?

    hard

    Run EXPLAIN to see the execution plan, look for full table scans and large sorts, check that filters and join columns are indexed, avoid functions on indexed columns in WHERE, select only needed columns, and check for missing statistics or row explosion from a join. Change one thing at a time and measure. Mention pagination for large result sets.

  11. 11

    Describe a technical challenge in your project and how you solved it.

    medium

    Pick a specific one, such as slow responses, a concurrency bug or a tricky data model. State how you measured or reproduced it, the options you considered and why you chose one, and the measured improvement. Nagarro interviewers are described as probing reasoning, so show the alternatives you rejected.

  12. 12

    Why Nagarro, and how do you keep learning?

    easy

    Connect to the kind of work: engineering for clients on varied products and technologies. Then show learning habits with evidence, such as a side project, an open-source contribution or a course you completed with something built. Avoid vague statements like I am a fast learner without an example.

Frequently asked questions

Is Nagarro hard for freshers?

Candidates commonly describe the coding test as tougher than many services-company tests, with medium-level problems and technical depth in interviews.

Which topics matter most?

Data structures and algorithms, OOP and design principles, your main language and your projects.

Does Nagarro ask design patterns?

Commonly reported for development roles, especially Singleton, Factory and Observer.

Can I use Python?

The allowed languages depend on the test. Check your invitation.

Where do I find official Nagarro roles?

On Nagarro's own careers site.

Related guides

More in Company Interview Questions

See all in this section