nagarro logo
Nagarro· Java Developer

Nagarro Online Assessment – Java Dev (3-5 Years) | DSA + SQL + Java + Spring Boot | Mettl

Posted
4 May 2025
432 reads

Summary

I participated in the Nagarro Online Assessment for a Java Developer role, which included DSA coding, SQL, Java, Spring Boot, Java 8 MCQs, and Aptitude questions. I solved the DSA and SQL problems, detailing my approach for the DP jumping problem.

How it went

🏢 Company: Nagarro 📝 Round: Online Assessment (OA) 📅 Date: [Insert the date you appeared] 📍 Platform: Mettl 👨‍💻 Role: Java Developer (3–5 Years Experience) 🧪 Test Pattern: Total Duration: 2 hours

Platform: Mettl

Sections Included:

✅ 4 DSA Coding Questions

✅ 2 SQL Questions

✅ 20 Java MCQs

✅ 20 Spring Boot MCQs

✅ 10 Java 8 MCQs

✅ 20 Aptitude Questions

💻 DSA Coding Questions (4): Chocolate Arrangement

Type: Implementation / Greedy

Description: Arrange chocolates in a way to avoid specific constraints (e.g., no two same adjacent types, maximize variation).

Difficulty: Medium

Find Maximum Length Subarray with Bitwise OR = 1

Type: Bit Manipulation / Sliding Window

Description: Given a binary array, find the longest subarray where the bitwise OR of all elements is exactly 1.

Difficulty: Medium

Find Numbers with Exactly 3 Set Bits < N

Type: Bit Manipulation / Combinatorics

Description: Given an integer N, count how many numbers less than N have exactly 3 set bits in their binary form.

Difficulty: Medium

DP Jumping Problem (Jump to i+1 or i+3)

Type: Dynamic Programming

Description: From index 0, you can jump to i+1 or i+3 to reach the end. Each index has a score. Maximize the total score.

Difficulty: Medium

Approach: Solved using both memoization and tabulation. Compared max score from each jump option at every index.

🗃️ SQL Questions (2): Basic SELECT Query

Difficulty: Easy

Description: Simple query using SELECT, WHERE, ORDER BY on a single table.

LEFT JOIN Query

Difficulty: Medium

Description: Join two tables and return unmatched records from the left table.

Tip: Be comfortable using LEFT JOIN and handling NULL values in filters.

☕ MCQ Sections: Java (20 MCQs): Covers OOPs, Exception Handling, Threads, Collections, and basic language fundamentals.

Spring Boot (20 MCQs): Focused on annotations, REST controllers, autowiring, dependency injection, and bean lifecycle.

Java 8 (10 MCQs): Mostly on streams, lambdas, method references, functional interfaces, and Optional.

Aptitude (20 Questions): Quantitative aptitude and logical reasoning – difficulty ranged from easy to moderate.

Questions asked (6)

  1. 01

    Chocolate Arrangement

    Data Structures & Algorithms · Medium

    Arrange chocolates in a way to avoid specific constraints (e.g., no two same adjacent types, maximize variation).

  2. 02

    Find Maximum Length Subarray with Bitwise OR = 1

    Data Structures & Algorithms · Medium

    Given a binary array, find the longest subarray where the bitwise OR of all elements is exactly 1.

  3. 03

    Find Numbers with Exactly 3 Set Bits < N

    Data Structures & Algorithms · Medium

    Given an integer N, count how many numbers less than N have exactly 3 set bits in their binary form.

  4. 04

    DP Jumping Problem (Jump to i+1 or i+3)

    Data Structures & Algorithms · Medium

    From index 0, you can jump to i+1 or i+3 to reach the end. Each index has a score. Maximize the total score.

  5. 05

    Basic SELECT Query

    Other · Easy

    Simple query using SELECT, WHERE, ORDER BY on a single table.

  6. 06

    LEFT JOIN Query

    Other · Medium

    Join two tables and return unmatched records from the left table. Tip: Be comfortable using LEFT JOIN and handling NULL values in filters.

How they prepared

⏱️ Time management is crucial – With multiple sections, it's important not to spend too much time on one DSA problem.

💡 DSA sections were bit-heavy – Focus on practicing bit manipulation, combinatorics, and dynamic programming.

🧠 SQL was straightforward – Be confident with JOINs, filtering, grouping, and sorting operations.

☕ Java & Spring Boot MCQs covered real-world scenarios and in-depth concepts.

📘 Java 8 section leaned heavily on functional programming – make sure you're fluent with streams and lambda expressions.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Nagarro recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!