Click To Get Off-Campus Placement Jobs Info !!!
FREE!!! Latest Nagarro FULL Aptitude Mock Test for Practice
Practice 5+ Mettl Aptitude Mock Test

Coding Questions Asked in Nagarro

    1 / 8

    Given an array of size MxN and coordinates of starting of subarray (x, y). You need to rotate that subarray and then print the full array after rotation.

    Input : NA


    Output : NA

    Please Login to view the answer

    Tags:Nagarro

    2 / 8

    Given a string, say sentence=" this is crazy and fun" and a list, say name=["is", "fun"]. Now you need to capitalize on the first letter of every word in the given string which is not present in the list.

    Input : this is crazy and fun


    Output : This is Crazy And fun

    Please Login to view the answer

    Tags:Nagarro

    3 / 8

    Given three sorted arrays A, B, and C. Write the most efficient algorithm to find the 5th largest element among the three arrays.

    Input : NA


    Output : NA

    Please Login to view the answer

    Tags:Nagarro

    4 / 8

    Return the character which occurs for the maximum numbers of times in the Input String. If multiple characters occur with the same highest frequency then return "0".

    Input : Input1: abcdd


    Output : output: d Explanation: The heighest frequencyletter in the string "abcdd", is d.

    View Answer |  Strings |  Practice Program | Add to Reading List To Reading List | Asked In TCS NQTNagarroHackerRank |  Experience, Fresher
    Please Login to view the answer

    5 / 8

    A prime number is a whole number greater than 1 that is divisible only by itself and the number 1. Given 'n' (1 <= n <= 100000), find the nth prime number.

    Input : An integer n


    Output : Return the nth prime number.

    Please Login to view the answer

    6 / 8

    A Derangement is a permutation of n elements, such that no element appears in its original position. For example, a derangement of {0, 1, 2, 3} is {2, 3, 1, 0}. Given a number n, find the total number of Derangements of a set of n elements.

    Input : 1st Input: n = 2 For two elements say {0, 1}, there is only one possible derangement {1, 0} 2nd Input: n = 3 For three elements say {0, 1, 2}, there are two possible derangements {2, 0, 1} and {1, 2, 0}


    Output : 1st Output: 1 2nd Output: 2

    Please Login to view the answer

    7 / 8

    Every character in the input string is followed by its frequency. Write a function to decrypt the string and find the nth character of the decrypted string. If no character exists at that positionthen then return "-1". For eg:- If the input string is "a2b3" the decrypted string is "aabbb". Note: The frequency of encrypted string cannot be greater than a single digit i.e.<10. Explanation: The decrypted string is "abccc", hence the 5th character in the decrypted string is "c".

    Input : Input Specification: Input1: A string. Input2:5


    Output : Output: c

    View Answer |  Basics |  Practice Program | Add to Reading List To Reading List | Asked In NagarroHackerRank |  Experience, Fresher
    Please Login to view the answer

    Tags:Nagarro

    8 / 8

    Given a number of objects N(non-repetitive object) Find the number of arrangements in which no objects occur at original positions.

    Input : Input1: N, the number of Objects. Input1: 3


    Output : Return the number of arrangements in which no object occurs at its original. Output: 2

    View Answer |  Basics |  Practice Program | Add to Reading List To Reading List | Asked In NagarroHackerRank |  Experience, Fresher
    Please Login to view the answer

    Tags:Nagarro




Q4I highly advised to practice all the basics and standard program asked at freshers or experienced level job interview in Nagarro. Practice our hand-picked coding interview questions asked in Nagarro. You can programed the given question in any language, you can post your answer and same time you can review the other answer. It is always recommanded to write your own program first and then refer others answers. At this page we have covers all the Nagarro coding questions in 2020 and previously asked in their Interview round or coding rounds.