Professional Documents
Culture Documents
Home Download Placement Papers Interview Q&A Placement Study Your Interview* Privacy Policy & TC
Home Mindtree Mindtree Coding Test Papers (AMCAT AUTOMATA) Interview QA HUB
Centum-Electronics CGI
Mindtree online coding test conducted by amcat, this autonama programming test consists CtrlS-Datacenter Data-Patterns
of two coding questions which have to be solved with using any of the following languages
C or C++ or Java. Selecting a particular language is completely our choice. Within 45 Decathlon-India Deloitte Directi
minutes of time one has to run two programs successfully using the online compiler.
DXC-Technology Ericsson Fujitsu
Here Iam guessing you will get one easy question and one hard question, There may be
chances of selection if your one of the program is running without any errors and giving HCL Hexaware-Technologies
status of test case is positive, and at least try to attempt for second answer, Coding
HITACHI HSBC IBM ICONMA
questions one will be pattern based another mainly a loop based question.
INDO-MIM-Pvt-Ltd Infosys-Ltd
InnoEye ITC-Infotech
Question:-Find a sub string in a given string and replace it with another string? Kony-IT-Services-Pvt-Ltd
Question:-Remove all the vowels from a given string using pointers concept KPIT-Technologies-Ltd
Ksolves-India-Pvt-Ltd Mindtree
Question:- Find the GCD of the two integers
Answer:-
PIAGGIO Practo-Technologies
#include <iostream>
using namespace std; Progressive-Infotech-Pvt-Ltd
int gcd_iter(int u, int v)
{ Qualcomm
int t;
while (v) Robert-Bosch-Engineering-And-Business-
Solutions-Pvt-Ltd
{
t = u;
Roots-Analysis S&P Global
u = v;
v = t % v; S&P Global Market Intelligence
}
return u < 0 ? -u : u; SAP-Labs Sapient
}
int main() Tata-Consultancy-Services(TCS)
{
Tech-Mahindra UNISYS Verizon
int n=3,m=6;
int result=gcd_iter(n,m);
WIPRO XL-PAT-LABS
cout<<result;
return 0; YODLEE-INFOTECH-PVT-LTD Zebronics
https://placementpapershub.blogspot.com/2017/04/mindtree-online-coding-test-amcat-autonama-programing-questions-answers.html 1/6
6/19/2019 Mindtree Coding Test Papers (AMCAT AUTOMATA)
}
Zensar-Technologies ZScaler
ZYCUS-Infotech
FromDocToPDF OPEN
Question:- Print all the prime numbers which are below the given number separated by comma.
Question:- Write a function to return a sorted array after merging two unsorted arrays, the
parameters will be two integer pointers for referencing arrays and two int variable, the length of
arrays (Hint: use malloc() to allocate memory for 3rd array):
Pattern Question:-
For n=5
1
3*2
4*5*6
10*9*8*7
11*12*13*14*15
Answer:-
#include <iostream>
using namespace std;
int main()
{
int n=5,num;
num=1;
int l=1;
int k=num;
for(int i=1;i<=n;i++)
{
k=num-1;
for(int j=1;j<=num;j++)
{
if(j%2==0)
cout<<"*";
else
{
if(i%2==0)
{
cout<<k+l-num+i;
l++;
k=k-2;
}
else
cout<<l++;
}
}
num=num+2;//the loop is going on as a prime number 1,3,5,7
cout<<"\n";
}
return 0;
}
https://placementpapershub.blogspot.com/2017/04/mindtree-online-coding-test-amcat-autonama-programing-questions-answers.html 2/6
6/19/2019 Mindtree Coding Test Papers (AMCAT AUTOMATA)
SPONSORED SEARCHES
Pattern Question:-
Pattern Question:-
1
22
333
4444
55555
4444
333
22
Pattern Question:-
To print the pattern like for n=3 the program should print
1 1 1 2
3 2 2 2
3334
Answer :-
#include <iostream>
using namespace std;
int main()
{
int n=3,c=n-1;
for(int i=1;i<=n;i++)
{
if(i%2==0)
cout<<c++;
for(int j=1;j<=n;j++)
{
cout<<i;
}
if(i%2!=0)
cout<<c++;
cout<<"\n";
}
return 0;
}
Pattern Question:-
To print the trapezium pattern. for example , we have n=4 the output should be like
1*2*3*4*17*18*19*20
- -5*6*7*14*15*16
https://placementpapershub.blogspot.com/2017/04/mindtree-online-coding-test-amcat-autonama-programing-questions-answers.html 3/6
6/19/2019 Mindtree Coding Test Papers (AMCAT AUTOMATA)
- - - -8*9*12*13
- - - - - -10*11
Answer:-
#include<iostream>
using namespace std;
int main(){
int n=4,num=1,i=1,space=0,k=1,number=n;
for(i=0;i<n;i++)
{
for(int j=1;j<=space;j++)
{
cout<<"-";
}
for(int m=1;m<2*n-space;m++)
{
if(m%2==0)
cout<<"*";
else
cout<<num++;
}
cout<<"*";
for(int l=1;l<2*n-space;l++)
{
if(l%2==0)
cout<<"*";
else
{
cout<<k+number*number;
k++;
}
}
number--;
space=space+2;
cout<<endl;
}
return 0;
}
Rs. 1.75 Lacs per Amdocs Online Test Amazon Online Test Mindtree Essay and
month Papers Interview Papers || Interview GD Topics
Questions Questions
Ad frankfinn.com blogspot.com blogspot.com blogspot.com
https://placementpapershub.blogspot.com/2017/04/mindtree-online-coding-test-amcat-autonama-programing-questions-answers.html 4/6
6/19/2019 Mindtree Coding Test Papers (AMCAT AUTOMATA)
6 Comments:
Hey need recent updated latest mindtree placement materials, WhatsApp me 8240210592
Reply
Replies
Reply
Replies
}
System.out.println();
s++;
}
for(int i=3;i>=0;i--)
{ --s;
int k=s;
k--;
for(int j=i-1;j>=0;j--)
{
System.out.print(k);
}
System.out.println();
}
}
Reply
https://placementpapershub.blogspot.com/2017/04/mindtree-online-coding-test-amcat-autonama-programing-questions-answers.html 5/6
6/19/2019 Mindtree Coding Test Papers (AMCAT AUTOMATA)
https://placementpapershub.blogspot.com/2017/04/mindtree-online-coding-test-amcat-autonama-programing-questions-answers.html 6/6