### Tech M 2nd Round Non-SDE Complete All Asked Coding Repeated Questions Complete Analysis With Solution Tech Mahindra 2nd Round 12th April Exam Shifts All Sections Question with Solution

Tech Mahindra 2nd Round 12th & 13th April Exam Shifts All Sections Question with Solution | Non-SDE Tech & Psychometric Assessment (1A/1B/1C) Solved by Pappu Career Guide

Tech Mahindra 2nd Round 12th April Exam Shifts Non-SDE Tech All Sections Question with Solution

## TECH MAHINDRA Non-SDE ALL CODING SOLUTIONS:

1. Gp ( Done)
2. Bitwise operation (Done)
3. Frequency Count (Done)
4. Caesar Cipher (Done)
5. Number of Decoding (Done)
6. Longest Common Subsequence
7. Numbers Puzzle
8. Longest Increasing Subsequence
9. Moving Apples
10. infix to postfix
11. Penalty
12. Euler’s Totient Function
13. Next Number Generator
14. Next Number Element
15. Maximum Subarray
16. Minimise a String
17. Dubai Airport
18. Possible Decodings
19. Longest Decreasing Subsequence
20. Longest Palindromic subsequence
21. Module 11 code
22. Roots of the Quadratic Equation
23. Maximum Subarray

# 1. Geometric Progression Question with Solution:

Geometric Progression In C++

// Solved By Pappu Career Guide

#include <bits/stdc++.h>

using namespace std;

int main() {

double second_term;

double third_term;

int n;

cin>>second_term>>third_term>>n;

double r = third_term/second_term;  //9/3=3

double a = second_term/r;

double nth_term = a * pow( r, n-1);
cout<<nth_term;

return 0;

}

# 2. BitWise Operation Question with Solution:

In C++

// solved by Pappu Kumar Guide

#include <bits/stdc++.h>

using namespace std;

int main() {

// a#b#c
// ex
// 10 - binary- 1 0 1 0
// output 2#1#3

int n;

cin>>n;

int a=0; // most

int b=-1; // least

int c=-1;

int i=0;
// solved by Pappu Career Guide

// performing bit marking
while(n>0)

{
if(n&1)

{
a++;

if(b==-1)

{

b=i;
}

c=i;
}

i++;

n=n>>1; //right shift
}

cout<< to_string(a)<<"#" << to_string(b) <<"#" << to_string(c);
// solved by Pappu Kumar Guide
return 0;

}

In Python