TCS Ninja Coding Questions
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
TCS Ninja Coding round is one of tricky round of whole TCS Coding process, for this round You need to master in TCS Ninja coding questions, you need not only have any coding language (C/C++/Java/Perl/ Python 2.7) knowledge, even you need to have strong logical thinking, to code the questions in given time. To make your TCS Ninja coding round preparation easy, we have listed here TCS Ninja coding questions, you can practice all the given questions, and try to write program in given time. After practicing these questions, you will be in a place to code most of the TCS Ninja coding questions in given 20 minutes time in your any of the 5 prefered programming languages i.e C/C++/Java/Perl/ Python 2.7.
Top Kudos Contributor
Trending Programming Qs.
- Write a program to print next to the last word of a sentence.
- Write a program to reverse the string?
- Write a program to reverse the string?
- Write fibonacci series program. INPUT: 10 term OUTPUT: 0 1 1 2 3 5...
- Given a string, say sentence=" this is crazy and fun" and a list, say ...
- Write a program to print the pyramid up to the passed integer value. ...
Last Month Contributor
- Write a program to count the no. of words in the given string?
- 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...
- Given a string, say sentence=" this is crazy and fun" and a list, say ...