Coding comprises 60% of the total weightage in the InfyTQ examination. If you are thoroughly prepared with the coding part then the chances of cracking the exam increase significantly as the cutoff is 65%.
Practice InfyTQ exam with Edyst Special Test Prep. Pack! Try 1 Free Module!
In this article, we will be discussing some previous coding questions that have been asked in the InfyTQ examination. This will give you an idea of the pattern of the questions asked.
To know the pattern and syllabus of the InfyTQ examination check our previous article on How to Prepare for the Infytq Examination?
Here are some of the Java coding questions that have been asked in previous years.
Input: Given a list of numbers separated with a comma.The numbers 5 and 8 are present in the list.
Assume that 8 always comes after 5.
Case 1: num1 -> Add all numbers which do not lie between 5 and 8 in the Input List.
Case 2: num2 -> Numbers formed by concatenating all numbers from 5 to 8 in the list
.Output: Sum of num1 and num2
Num1: 3+2+6+9 =20
Num2: 5148O/p=5148+20 = 5168
A string which is a mixture of letters, numbers, and special characters from which produce the largest
even number from the available digit after removing the duplicates digits.
If an even number did not produce then return -1.
O/p : -1
— — — — — — — — — — — -
O/p : 984312
Take input a number ’N’ and an array as given below.
Input:-N = 2
O/p : 2
Find the least number of unique elements after deleting N numbers of elements from the array.
In the above example, after deleting N=2 elements from the array.
In above 1,2 will be deleted.
So 3,3,4,4 will be remaining so,
2 unique elements are in the array i.e 3 and 4.
A non-empty string containing only alphabets. print the longest prefix from the input string which is the same as the suffix.
Prefix and Suffix should not be overlapped.
Print -1 if no prefix exists which is also the suffix without overlap.
Do case-sensitive comparison.
Positions start from 1.
Input : xxAbcxxAbcxx
o/p: xx (‘xx’ in the prefix and ‘xx’ in the suffix and this is the longest one in the input string so the output will be ‘xx’).
o/p: -1 (There is no prefix which is also a suffix so the output will be -1).
Number of odd sub-arrays.
Find the number of distinct subarrays in an array of integers such that the sum of the subarray is an odd integer, two subarrays are considered different if they either start or end at different indexes.
1 2 3
Explanation : Total subarrays are , [1, 2], [1, 2, 3], , [2, 3], 
In this there are four subarrays which sum is odd i.e: ,[1,2] ,[2,3],.
The questions asked are of medium difficulty and can be easily solved if you practice well. Practice on Complete Coding Test & Interview Preparation Pack to succeed at Coding rounds at companies like TCS (Ninja), Wipro, Infosys, Mindtree, ValueLabs, CGI, and many more.
When you practise, you get better. It’s very simple.
We hope you find this piece of writing helpful in any way possible.
Wanna drop us some suggestions & ideas to write articles on?
Write to us @ email@example.com
Visit Edyst Website — www.edyst.com
Visit Edyst YouTube Channel — www.youtube.com/edyst
Visit Edyst Instagram Page- www.instagram.com/edystme/
Visit Edyst Telegram Channel- t.me/edystannouncements
We are an online learning destination for aspiring software developers to get ready for the most in-demand job.
Check Edyst Most Popular Courses: