[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Coding Questions Asked in TCS Ninja

    1 / 4

    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 :

    Please Login to view the answer

    2 / 4

    Write an efficient program to find the sum of contiguous sub-array within a one-dimensional array of numbers which has the largest sum.

    Input : {-2, -3, 3, -1, -2, 1, 5, -3}


    Output :

    Please Login to view the answer

    3 / 4

    Given an expression string exp. Examine whether the pairs and the orders of “{“,”}”,”(“,”)”,”[“,”]” are correct in exp.
    For example, the program should print 'balanced' for exp = “[()]{}{[()()]()}” and 'not balanced' for exp = “[(])”

    Input : The first line of input contains an integer T denoting the number of test cases. Each test case consists of a string of expression, in a separate line.


    Output :

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

    4 / 4

    Given an array Arr of N positive integers and another number X. Determine whether or not there exist two elements in Arr whose sum is exactly X.

    Explanation: Arr[3] + Arr[4] = 6 + 10 = 16

    Input : N = 6, X = 16
    Arr[] = {1, 4, 45, 6, 10, 8}


    Output :

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




Q4I highly advised to practice all the basics and standard program asked at freshers or experienced level job interview in TCS Ninja. Practice our hand-picked coding interview questions asked in TCS Ninja. 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 TCS Ninja coding questions in 2020 and previously asked in their Interview round or coding rounds.