Tech Mahindra 21-24th November 2020 Asked Questions
Tech Mahindra 21-24th November 2020 Asked Questions | Tips to Follow to Crack Tech Mahindra Exam 2021 | All Sections: Aptitude | Essay | Technical Questions | Coding Question: Join Our Top Groups For Your Requirments Tech Mahindra Exam 2021 Camera On,
Negative marking is there,
you can next and previous questions
You cannot jump a section every section will have its own time.
75 questions aptitude - 142 min
15 min for essay
65 min for coding and 26 technical questions.
Tech Mahindra Pattern - 2020 ✓ Aptitude - 75 Q : 142 Mins ✓ Essay - 1Q: 15 Mins ✓ Technical - 26Q: 65 Mins. VIDEO
Tech Mahindra Exam review:
The level of questions of aptitude, reasoning, verbal was easy.
Basic coding question.
Essay writing is also a known topic.
.......The total Exam was quite EASY......
Coding Questions with Solutions:
1. findOddEvenDifferences
static int findOddEvenDifferences( int input1,int[] input2)
{
int osum=0;
int esum=0;
for ( int i=0;i<input1;i++)
{
if (input2[i]%2==0)
{
esum=esum+input2[i];
}
else{
osum=osum+input2[i];
}
}
return osum-esum;
}
2. findTotalDistance public int findTotalDistance( int input1,int[] input2) { int sum=0,difference=0; for ( int i=0;i<input1-1;i++) { difference= Math.abs(input2[i]-input2[i+1]); sum=sum+ difference; } return sum; } VIDEO
3. findTotalFeet: static int findTotalFeet(int input1 ,int[] input2) { int sum=0; for ( int i=0;i<input1;i++) { sum=sum+(input2[i]/12); } return sum; }
4. Find Max Diff int main() { int n; cin>>n; int a[n]; int maxdiff = 0; for(int i=0;i<n;i++) { cin>>a[i]; //10 11 7 12 14 10-11=-1 11-7=4 7-12=-7 12-14=-2 } for(int i=0;i<n - 1;i++) { if(maxdiff<a[i] - a[i+1]) maxdiff = a[i] - a[i+1]; } cout<<maxdiff<<endl; return 0; } 5. Find Max Diff def findMaxDiff(arr): arr.sort() maximum=float('-inf') for i in range(len(arr)-1): diff=arr[i+1]-arr[i] maximum=max(diff,maximum) return maximum
6. Find the Maximum Difference
int main()
{
int n;
cin>>n;
int a[n];
int maxdiff = 0;
for(int i=0;i<n;i++)
{
cin>>a[i]; //10 11 7 12 14 10-11=-1 11-7=4 7-12=-7 12-14=-2
}
for(int i=0;i<n - 1;i++)
{
if(maxdiff<a[i] - a[i+1])
maxdiff = a[i] - a[i+1];
}
cout<<maxdiff<<endl;
return 0;
}
7. findTotalDistance
public int findTotalDistance( int input1,int[] input2)
{
int sum=0,difference=0;
for ( int i=0;i<input1-1;i++)
{
difference= Math.abs(input2[i]-input2[i+1]);
sum=sum+ difference;
}
return sum;
}
8. findTotalDistance
findTotalDistance(int n, int arr[])
{
int i, distance=0;
for(i=0;i<n-1;i++)
{
distance+= abs(arr[i] - arr[i+1]);
}
return distance;
}
Join Our Top Groups For Your Requirments About The Post:
In this Post, All Students get to know all the information about upcoming interviews who is still not received Tech Mahindra Exam Mail Do Check out my Youtube Video for Better Understanding so how you can get your mail, as I get. All the best. and anyone has any questions related to this post you can reach to me or comment on this post you will get a response as soon as possible.
Comments
Post a Comment