Programming Questions in JAVA Asked at Experienced
211 / 226
This series is a mixture of 2 series all the odd terms in this series form even numbers in ascending order and every even terms is derived from the previous term using the formula (x/2)
Write a program to find the nth term in this series.
The value n in a positive integer that should be read from STDIN the nth term that is calculated by the program should be written to STDOUT. Other than the value of the nth term no other characters /strings or message should be written to STDOUT.
For example if n=10,the 10 th term in the series is to be derived from the 9th term in the series. The 9th term is 8 so the 10th term is (8/2)=4. Only the value 4 should be printed to STDOUT.
You can assume that the n will not exceed 20,000.
Input : NA
Output : NA
Tags:TCS NQT Wipro NLTH
212 / 226
Input : {-2, -3, 3, -1, -2, 1, 5, -3}
Output :
Tags:Huawei Wipro NLTH TCS Ninja
213 / 226
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
214 / 226
Input : The first line of input contains an integer T, denoting the number of testcases. Then T test cases follow. Each test case contains an integer N, denoting the size of the square matrix. Then in the next line are N*N space separated values of the matrix.
Output :
Tags:Wipro NLTH
215 / 226
Right rotate the array clockwise by 1.
Delete the (n-k+1)th last element.
Now, find the element which is left at last.
Input : The first line of input contains an integer T denoting the number of test cases. Then T test cases follows. Each test case contains two lines. The first line of each test case contains an integer N. Then in the next line are N space separated values of the array arr[].
2
4
1 2 3 4
6
1 2 3 4 5 6
Output :
Tags:Wipro NLTH
216 / 226
Input : Input: N = 3, arr[] = {2, 4, 6}
Explanation: GCD of 2,4,6 is 2.
Output :
Tags:Wipro NLTH
217 / 226
Note:
A triangle is possible
with all the elements 5, 3 and 4.
Input : 3
3 5 4
Output :
Tags:Wipro NLTH
218 / 226
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
219 / 226
Input : N = 5
Output :
Tags:Wipro NLTH
220 / 226
The first line contains T denoting the number of testcases. T testcases follow. Each case contains a string S containing characters.
Input : i.like.this.program.very.much
Output :
Tags:Wipro NLTH
You at page 22 practice here all the basics and standard c, C++, JAVA, Python program asked at Experience level job interview or in coding round. Practice our hand-picked 22 coding round programming interview questions asked in coding round of various it companies and exams. You can practice all the given at this page 22 programed given C, C++, JAVA, Python question in any language, you can post your answer and same time you can review other users answer. It is always recommanded to write your own C, C++, JAVA, Python coding questions answer first and then refer others answers. At this page 22 we have covers all the coding questions in 2020-2021 and previously asked in their Interview round or coding rounds.
Top Kudos Contributor
Trending Programming Qs.
- Given a string, say sentence=" this is crazy and fun" and a list, say ...
- Write a program to print next to the last word of a sentence.
- Write a program to generate a simple pattern. 1 12 123 1234 123 ...
- There are many cars parked in the parking lot. The parking is a straig...
- Write fibonacci series program. INPUT: 10 term OUTPUT: 0 1 1 2 3 5...
- Write a program to print next to the last word of a sentence.
Last Month Contributor
- Write a program to print next to the last word of a sentence.
- 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 ...
- Write a program to remove the vowels from the input string.
- Write fibonacci series program. INPUT: 10 term OUTPUT: 0 1 1 2 3 5...