Similar reads.
The clock will update automatically if you turn on javascript in your browser..
−10 hours | −10 hours | |
−8 hours | −8 hours | |
−7 hours | −7 hours | |
−7 hours | −7 hours | |
−6 hours | −6 hours | |
−3 hours | −3 hours | |
−2 hours | −2 hours | |
−2 hours | −2 hours | |
−1 hours | −1 hours | |
−1 hours | −1 hours | |
−1 hours | −1 hours | |
0 | ||
0 | ||
0 | ||
+1 hours | ||
+2.5 hours | ||
+5 hours | ||
+5 hours | ||
+5 hours | ||
+6 hours | ||
+7 hours |
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
Example: 3,2,6,5,1,4,8,9
Num1: 3+2+6+9 =20
Num2: 5148O/p=5148+20 = 5168
Question 2:.
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.
Ex: infosys@337
— — — — — — — — — — — -
Hello#81@21349
O/p : 984312
Take input a number ’N’ and an array as given below.
Input:-N = 2
Array =1,2,3,3,4,4
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’).
Input: Racecar
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.
Explanation : Total subarrays are [1], [1, 2], [1, 2, 3], [2], [2, 3], [3]
In this there are four subarrays which sum is odd i.e: [1],[1,2] ,[2,3],[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.
W hen 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 protected]
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:
- Full Stack Web Developer Bootcamp
- Adv. Algorithms and Data Structures Bootcamp
- Python Programming: Intro + Advanced
- Java Programming: Intro + Advanced
- Complete Coding Test and Preparation Pack
- Wipro Elite NLTH 2021 Test Pack
Sanket is currently pursuing B.tech in Information Technology and loves to solve real-life problems through coding. He loves doing competitive programming & has also worked as a Content Creator Intern in many companies.
Try past year questions of companies of Accenture, Wipro, Cognizant, EPAM, Mintree, Capgemini.
Crack exams like TCS Ninja NQT, TCS Digital, Infosys HackWithInfy, Hexaware, Infosys Infy TQ, TCS CodeVita.
Try our Free Pack
See more companies
Enroll with the best online training institute, offering quality courses to fulfill your Basic Of Java needs, be it entry level or at an expert level!!
Instantly share code, notes, and snippets.
#DSA-Assgn-1 | |
def merge_list(list1, list2): | |
merged_data="" | |
list3=list() | |
#write your logic here | |
list2.reverse() | |
for i in range((len(list2))): | |
if list2[i] is not None: | |
merged_data+="%s%s "%(list1[i],list2[i]) | |
else: | |
merged_data+="%s "%(list1[i]) | |
resultant_data=merged_data | |
return resultant_data | |
#Provide different values for the variables and test your program | |
list1=['A', 'app','a', 'd', 'ke', 'th', 'doc', 'awa'] | |
list2=['y','tor','e','eps','ay',None,'le','n'] | |
merged_data=merge_list(list1,list2) | |
print(merged_data) | |
#DSA-Assgn-2 | |
class Car: | |
def __init__(self,model,year,registration_number): | |
self.__model=model | |
self.__year=year | |
self.__registration_number=registration_number | |
def get_model(self): | |
return self.__model | |
def get_year(self): | |
return self.__year | |
def get_registration_number(self): | |
return self.__registration_number | |
def __str__(self): | |
return(self.__model+" "+self.__registration_number+" "+(str)(self.__year)) | |
#Implement Service class here | |
class Service: | |
def __init__(self,car_list): | |
self.car_list=car_list | |
def get_car_list(self): | |
return self.car_list | |
def find_cars_by_year(self,year): | |
cars_in_year=[] | |
for car in self.car_list: | |
if(car.get_year()==year): | |
cars_in_year.append(car) | |
return cars_in_year | |
def add_cars(self,new_car_list): | |
self.car_list.extend(new_car_list) | |
return self.car_list | |
def remove_cars_from_karnataka(self): | |
for car in self.car_list: | |
if(car.get_registration_number().find("KA")): | |
print(car) | |
self.car_list.remove(car) | |
return self.car_list | |
car1=Car("WagonR",2010,"KA09 3056") | |
car2=Car("Beat", 2011, "MH10 6776") | |
car3=Car("Ritz", 2013,"KA12 9098") | |
car4=Car("Polo",2013,"GJ01 7854") | |
car5=Car("Amaze",2014,"KL07 4332") | |
#Add different values to the list and test the program | |
car_list=[car1, car2, car3, car4,car5] | |
#Create object of Service class, invoke the methods and test your program | |
ser=Service(car_list) | |
cl=ser.get_car_list() | |
for car in cl: | |
print(car) | |
print("---------------------------") | |
cy=ser.find_cars_by_year(2013) | |
for car in cy: | |
print(car) | |
car4=Car("afadf",2017,"KA01 7854") | |
car5=Car("dsasada",2017,"KL07 4332") | |
print("---------------------------") | |
sd=ser.add_cars([car4,car5]) | |
for car in sd: | |
print(car) | |
print("---------------------------") | |
sa=ser.remove_cars_from_karnataka() | |
for car in sa: | |
#print(car) | |
pass | |
#PF-Prac-2 | |
def bracket_pattern(input_str): | |
opening='(' | |
closing=')' | |
pattern=0 | |
for bracket in input_str: | |
if input_str[0] is closing or input_str[-1:] is opening: | |
return False | |
if bracket is opening: | |
pattern+=1 | |
else: | |
pattern-=1 | |
if(pattern%2==0): | |
return True | |
else: | |
return False | |
input_str="(())()" | |
print(bracket_pattern(input_str)) | |
#PF-Prac-4 | |
def find_nine(nums): | |
#Remove pass and write your code here | |
nums4=nums[:4] | |
if 9 in nums4: | |
return True | |
else: | |
return False | |
nums=[1,3,4,5,6] | |
print(find_nine(nums)) | |
#PF-Prac-5 | |
def count_digits_letters(sentence): | |
#start writing your code here | |
letters=0 | |
nums=0 | |
for i in sentence: | |
if(i.isdigit()): | |
nums+=1 | |
else: | |
letters+=1 | |
result_list=[letters,nums] | |
return result_list | |
sentence="Infosys Mysore 570027" | |
print(count_digits_letters(sentence)) | |
#PF-Prac-6 | |
def list123(nums): | |
#start writing your code here | |
seq=False | |
for i in range(len(nums)-2): | |
if(nums[i]==1 and nums[i+1]==2 and nums[i+2]==3): | |
return True | |
return False | |
nums=[1,1,1,2,3] | |
print(list123(nums)) | |
#PF-Prac-7 | |
def seed_no(number,ref_no): | |
#start writing your code here | |
num1=number | |
digits=[] | |
while(num1>0): | |
digits.append(num1%10) | |
num1=num1//10 | |
prod=number | |
for i in digits: | |
prod=prod*i | |
if(prod==ref_no): | |
return True | |
else: | |
return False | |
number=123 | |
ref_no=728 | |
print(seed_no(number,ref_no)) | |
#PF-Prac-8 | |
def calculate_net_amount(trans_list): | |
#start writing your code here | |
net_amount=0 | |
for transaction in trans_list: | |
action=transaction[0] | |
amount=int(transaction[2:]) | |
if(action=='D'): | |
net_amount+=amount | |
else: | |
net_amount-=amount | |
return net_amount | |
trans_list=["D:330","D:200","W:230","D:100"] | |
print(calculate_net_amount(trans_list)) | |
#PF-Prac-9 | |
def generate_dict(number): | |
#start writing your code here | |
new_dict={} | |
for num in range(1,number): | |
new_dict[num]=num**2 | |
return new_dict | |
number=20 | |
print(generate_dict(number)) | |
#PF-Prac-10 | |
def string_both_ends(input_string): | |
#start writing your code here | |
if(len(input_string)>1): | |
start=input_string[:2] | |
end=input_string[-2:] | |
return start+end | |
else: | |
return -1 | |
input_string="w3" | |
print(string_both_ends(input_string)) | |
#PF-Prac-11 | |
def find_upper_and_lower(sentence): | |
#start writing your code here | |
caps=small=0 | |
for i in sentence: | |
if(i.isupper()): | |
caps+=1 | |
else: | |
small+=1 | |
result_list=[caps,small] | |
return result_list | |
sentence="Come Here" | |
print(find_upper_and_lower(sentence)) | |
#PF-Prac-12 | |
def generate_sentences(subjects,verbs,objects): | |
sentence_list=[] | |
#start writing your code here | |
for subj in subjects: | |
for verb in verbs: | |
for obj in objects: | |
sentence=subj+" "+verb+" "+obj | |
sentence_list.append(sentence) | |
return sentence_list | |
subjects=["I","You"] | |
verbs=["love", "play"] | |
objects=["Hockey","Football"] | |
print(generate_sentences(subjects,verbs,objects)) | |
#PF-Prac-13 | |
def close_number(num1,num2,num3): | |
flagA=flagB=False | |
#start writing your code here | |
diffs=[] | |
#cond A to check numbers close by atmost 1 | |
ndiff=[num1-num2,num2-num3,num3-num1] | |
for i in ndiff: | |
if(i<=0): | |
diffs.append(i*-1) | |
else: | |
diffs.append(i) | |
if(min(diffs)<=1): | |
flagA=True | |
#find missing num | |
print(diffs) | |
#cond B to check missed number>2 | |
diffs.remove(1) | |
if(max(diffs)>2): | |
flagB=True | |
if (flagA and flagB): | |
return True | |
else: | |
return False | |
print(close_number(1,2,3)) | |
#PF-Prac-16 | |
def rotate_list(input_list,n): | |
#start writing your code here | |
output_list=[] | |
if(n==0) | |
return input_list | |
readPos=len(input_list)-n | |
for i in input_list: | |
output_list.append(input_list[readPos]) | |
readPos+=1 | |
if(readPos==len(input_list)): | |
readPos=0 | |
return output_list | |
input_list= [1,2,3,4,5,6] | |
output_list=rotate_list(input_list,1) | |
print(output_list) | |
#PF-Prac-32 | |
#import math | |
def check_squares(number): | |
#start writing your code here | |
limit=int(number**0.5)+1 | |
print(limit) | |
for i in range(1,limit): | |
for j in range(1,limit): | |
res=(i**2)+(j**2) | |
if(res==number): | |
return True | |
return False | |
number=13 | |
print(check_squares(number)) | |
#PF-Prac-33 | |
def integer_to_english(number): | |
#start writing your code here | |
subNum="" | |
inEnglish="" | |
numWord={0:"\0",1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen",17:"seventeen",18:"eighteen",19:"nineteen",20:"twenty",30:"thirty",40:"fourty",50:"fifty",60:"sixty",70:"seventy",80:"eighty",90:"ninty",100:"hundred",1000:"thousand"} | |
if(number>1000): | |
return -1 | |
else: | |
if(number in numWord.keys()): | |
inEnglish=numWord[number] | |
return inEnglish | |
else: | |
subNum=str(number) | |
if(number>99): | |
hundreds=int(subNum[0]) | |
tens=int(subNum[1])*10 | |
units=int(subNum[2]) | |
if(number<=99): | |
tens=int(subNum[0])*10 | |
units=int(subNum[1]) | |
if(number<100): | |
inEnglish=numWord[tens]+" "+numWord[units] | |
else: | |
if(number<=120): | |
tens=tens+units | |
inEnglish=numWord[hundreds]+" "+"hundred and "+numWord[tens] | |
else: | |
inEnglish=numWord[hundreds]+" "+"hundred and "+numWord[tens]+" "+numWord[units] | |
return inEnglish | |
number=140 | |
print(integer_to_english(number)+" only!") | |
"""Consider a non-empty array of comma separated strings instr, where each element is of the format alphabets:number, return the string outstr after performing the below operations for each element: | |
Find sum of squares of the digits present in number | |
If the sum is even, then rotate the corresponding alphabets once towards right | |
If the sum is odd, rotate the corresponding alphabets twice towards left | |
Concatenate the rotated alphabets to the output string outstr separated by ','(comma) | |
Assumption: number will always be non zero positive integer and alphabets will contain at least one alphabet | |
Input format: | |
Read the array of strings instr with the elements separated by ','(comma) from the standard input stream. | |
Output format: | |
Print the string outstr to the standard output stream. | |
[Sample Input]: | |
rtAG:10328,nsHDE:85637 | |
[Sample Output ]: | |
GrtA,HDEns | |
[EXPLANATION]: | |
The first string is ‘rtAG:10328’, the sum of square of the digits 1, 0, 3, 2 and 8 is 78 which is even. So the alphabets after rotating once towards the right is 'GrtA'. The second string is 'nsHDE:85637', the sum of square of the digits 8, 5, 6, 3 and 7 is 183 which is odd. So the alphabets after rotating twice towards the left is 'HDEns'. Hence the output is 'GrtA,HDEns' | |
[SOLUTION] | |
""" | |
instr="rtAG:10328,nsHDE:85637" | |
strs=instr.split(',') | |
outlist=[] | |
def rotright1(code): | |
return code[-1]+code[:-1] | |
def rotleft2(code): | |
return code[2:]+code[:2] | |
for msg in strs: | |
code,value=msg.split(":") | |
squares=list(str(value)) | |
sqsum=0 | |
sqsum=sum([int(i)**2 for i in squares]) | |
if(sqsum%2 == 0): | |
outlist.append(rotright1(code)) | |
else: | |
outlist.append(rotleft2(code)) | |
outstr=",".join(outlist) | |
print(outstr) |
Learn and Practice👍
Sorry, something went wrong.
Phone 8 (496) 575-02-20 8 (496) 575-02-20
Phone 8 (496) 511-20-80 8 (496) 511-20-80
COMMENTS
Hii friends, In this repo I have provided Infosys Springboard Assignment's solutions. If you are facing any problem while doing assignments you can comment below the video. - GitHub - ErShreyas/InfyTQ-Programming-Using-Java: Hii friends, In this repo I have provided Infosys Springboard Assignment's solutions. If you are facing any problem while doing assignments you can comment below the video.
Add this topic to your repo. To associate your repository with the infytq-assignment-solutions topic, visit your repo's landing page and select "manage topics." GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
Hii friends, In this repo I have provided Infosys Springboard Assignment's solutions. If you are facing any problem while doing assignments you can comment below the video. - ErShreyas/InfyTQ-...
The platform consists of various assignments with rising difficulty levels. I am presenting my solutions to all the assignments in the InfyTQ platform. So go ahead and fork this repo and include your efficient solutions! https://infytq.infosys.com - automatic! InfyTQ. Would love to include your solutions into this repo!
Prepare for Infosys Java interviews with confidence using our curated collection of Java interview questions and answers. Covering fundamental concepts to advanced topics, this resource is tailored for candidates aspiring to join Infosys, a global leader in IT consulting. Elevate your Java skills, tackle technical discussions effectively, and enhance your chances of success in Infosys Java ...
What is InfyTQ Certification Exam:-. InfyTQ Certification Exam is a Certification Exam by Infosys that you have the opportunity to get Job into Infosys as well as certified from Infosys and Become "Infosys Certified Software Programmer". InfyTQ Certification Exam is for the BE/BTECH/MTECH/MCA/MCM In the third Year 6 Sem if you are graduate ...
This repository aims to provide the solutions of the problems in the Certification course "Programming Using Java" on Infosys Springboard - ayush03ch/Infosys-Springboard-Programming-using...
Infosys SDE Sheet. Infosys Limited is a multinational IT company based in India that offers business consulting, IT, and outsourcing services. It was founded in Pune and its headquarter is in Bangalore. Infosys is India's second-largest IT company and many students dream to work at Infosys. This sheet consists of all the common interview ...
3 Institute for the Study of War and AEI's Critical Threats Project 2024 migrant workplaces and increase crackdowns at border crossings to temporarily placate emotional cries
Sunset: 09:07PM. Day length: 17h 24m. Solar noon: 12:25PM. The current local time in Elektrostal is 25 minutes ahead of apparent solar time.
Basics Of Java. Enroll with the best online training institute, offering quality courses to fulfill your Basic Of Java needs, be it entry level or at an expert level!! 2 days. InfyTQ features Java coding questions, that require you to be up-to-date with the latest released technologies in the industry.
This Repository contains all the solutions of assignments in the Certification course Programming Using Java NOTE : The arrangements of module might change with time, files I have placed in certain directories might be in differenet categorization on the platform.
The H2K Infosys Java/J2EE training course is divided into 8 exhaustive modules. Module 1 delves deep into the topics of Core Java and JDBC. Module 2 throws light on J2EE Concepts, EL Expressions, Servlets and JSP. You will be taught about XML, Struts and MVC framework as part of Module 3.
INFOSYS Python Practice solutions. print (integer_to_english (number)+" only!") Read the array of strings instr with the elements separated by ',' (comma) from the standard input stream. Print the string outstr to the standard output stream. The first string is 'rtAG:10328', the sum of square of the digits 1, 0, 3, 2 and 8 is 78 which is even.
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects. ... you can find solution to Infosys Springboard DBMS Part-1 assignments, quiz and exercises. ... You can add Java Solution of question or some other question which was not added here.
State Housing Inspectorate of the Moscow Region Elektrostal postal code 144009. See Google profile, Hours, Phone, Website and more for this business. 2.0 Cybo Score. Review on Cybo.
InfyTQ is a free platform open to all engineering students in their third and fourth year across India. The platform encourages holistic development by imparting technical as well as professional skills and help them become industry ready. I started this course on June 15th 2019. The platform consists of various assignments with rising ...
Many travellers enjoy visiting Summery House A.I. Morozova (7.6 miles), Shirokov House (8.5 miles), and Pavlovo-Pokrovskaya Factory (8.5 miles). See all nearby attractions. Yakor Hotel, Elektrostal: See 6 traveller reviews, candid photos, and great deals for Yakor Hotel, ranked #3 of 4 hotels in Elektrostal and rated 3 of 5 at Tripadvisor.
Contribute to MeetNM/Infosys-DSA-using-java development by creating an account on GitHub.
This Repository contains all the solutions of assignments in the Certification course Data Structures and Algorithms Using Java NOTE : The arrangements of module might change with time, files I have placed in certain directories might be in differenet categorization on the platform.
Contribute to MeetNM/Infosys-DSA-using-java development by creating an account on GitHub.
Contribute to MeetNM/Infosys-DSA-using-java development by creating an account on GitHub.
Add this topic to your repo. To associate your repository with the assignment-solutions topic, visit your repo's landing page and select "manage topics." GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.