Coding Questions Asked in TCS Ninja
1 / 4
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 :
Tags:Nagarro Wipro NLTH TCS Ninja
2 / 4
Input : {-2, -3, 3, -1, -2, 1, 5, -3}
Output :
Tags:Huawei Wipro NLTH TCS Ninja
3 / 4
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 :
Tags:Wipro NLTH TCS Ninja
4 / 4
Explanation: Arr[3] + Arr[4] = 6 + 10 = 16
Input : N = 6, X = 16
Arr[] = {1, 4, 45, 6, 10, 8}
Output :
Tags:Wipro NLTH TCS Ninja
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.
Top Kudos Contributor
Trending Programming Qs.
- Given a number n, print all primes smaller than or equal to n. It is a...
- Write a program to count the no. of words in the given string?
- Sort a list of dates in ascending order given the data format shown be...
- Read a string from terminal.Create a linked list to store each charact...
- Write a program to remove the vowels from the input string.
- Write a program to check whether given date is valid or not?
Last Month Contributor
- Write a program to count the no. of words in the given string?
- Given a number n, print all primes smaller than or equal to n. It is a...
- Write a program to print next to the last word of a sentence.
- Write a program to reverse the string?
- Write a program to convert uppercase to lower case and vice versa of a...