# Wipro Talent Next Milestone 4 Coding Questions 2024 (With Solutions)

## Wipro Talent Next Milestone 4 Coding Questions 2024 | Wipro Talent Next Milestone Coding Questions | Wipro Talent Next Milestone 4 Coding Questions & Answers | Wipro Talent Next Milestone 4 Sample Coding Questions

Wipro Talent Next Milestone 4 Coding Questions 2024:  Aspirants who pass in the Online Test will qualify for the coding test process. The coding test will be conducted for the process to check the candidate’s capability. The Wipro Talent Next Milestone 4 Coding Questions will be asked in any language. In the below section, we have provided the Java, C, C++, and Python Coding Questions with Solutions. With the clear Explanation, we have provided all the details here.

Solve the Frequently Asked coding test Questions to help with your study. Before entering the coding test, aspirants can start their preparation by downloading or viewing the practice questions. Here we have provided the study material for the coding test. More details like Wipro Talent Next Milestone 4 Coding Questions, Wipro Talent Next Milestone 4 Coding Questions With Answers, Salary, Hike, Increment, Annual Appraisal, etc. on this page.

### Wipro Talent Next Milestone 4 Coding Questions With Solutions

QUESTIONS) Check whether two Strings are anagram of each other

Input

``````“gram”
“arm”``````

Solution:

PYTHON PROGRAM

```// C++ program to check whether two strings are anagrams
// of each other
#include <bits/stdc++.h>
using namespace std;

/* function to check whether two strings are anagram of
each other */
bool areAnagram(string str1, string str2)
{
// Get lengths of both strings
int n1 = str1.length();
int n2 = str2.length();

// If length of both strings is not same, then they
// cannot be anagram
if (n1 != n2)
return false;

// Sort both the strings
sort(str1.begin(), str1.end());
sort(str2.begin(), str2.end());

// Compare sorted strings
for (int i = 0; i < n1; i++)
if (str1[i] != str2[i])
return false;

return true;
}

// Driver code
int main()
{
string str1 = "gram";
string str2 = "arm";

// Function Call
if (areAnagram(str1, str2))
cout << "The two strings are anagram of each other";
else
cout << "The two strings are not anagram of each "
"other";

return 0;
}
C++ PROGRAM
```
```# your code goes here

class Solution:

# Function is to check whether two strings are anagram of each other or not.
def isAnagram(self, a, b):

if sorted(a) == sorted(b):
return True
else:
return False

# {
# Driver Code Starts

if __name__ == '__main__':
a = "gram"
b = "arm"
if(Solution().isAnagram(a, b)):
print("The two strings are anagram of each other")
else:
print("The two strings are not anagram of each other")
Output
```
``The two strings are not anagram of each other``

QUESTIONS)  Pythagorean Triplet in an array

Input

``{10, 4, 6, 12, 5}``

Solution:

PYTHON PROGRAM

```#include <iostream>

using namespace std;

// Returns true if there is Pythagorean triplet in ar[0..n-1]
bool isTriplet(int ar[], int n)
{
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
for (int k = j + 1; k < n; k++) {
// Calculate square of array elements
int x = ar[i] * ar[i], y = ar[j] * ar[j], z = ar[k] * ar[k];

if (x == y + z || y == x + z || z == x + y)
return true;
}
}
}

// If we reach here, no triplet found
return false;
}

int main()
{
int ar[] = { 10, 4, 6,12, 5 };
int ar_size = sizeof(ar) / sizeof(ar[0]);
isTriplet(ar, ar_size) ? cout << "Yes" : cout << "No";
return 0;
}
C++ PROGRAM
```
```#include <iostream>

using namespace std;

// Returns true if there is Pythagorean triplet in ar[0..n-1]
bool isTriplet(int ar[], int n)
{
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
for (int k = j + 1; k < n; k++) {
// Calculate square of array elements
int x = ar[i] * ar[i], y = ar[j] * ar[j], z = ar[k] * ar[k];

if (x == y + z || y == x + z || z == x + y)
return true;
}
}
}

// If we reach here, no triplet found
return false;
}

int main()
{
int ar[] = { 10, 4, 6,12, 5 };
int ar_size = sizeof(ar) / sizeof(ar[0]);
isTriplet(ar, ar_size) ? cout << "Yes" : cout << "No";
return 0;
}
Output
```
``Yes``

QUESTIONS) Program for factorial of a number

Input

``7` Solution: PYTHON PROGRAM `
```// C++ program for factorial of a number
#include <iostream>
using namespace std;

unsigned int factorial(unsigned int n)
{
int res = 1, i;
for (i = 2; i <= n; i++)
res *= i;
return res;
}

// Driver code
int main()
{
int num = 7;
cout << "Factorial of "
<< num << " is "
<< factorial(num) << endl;
return 0;
}```
```C++ PROGRAM
```
```def factorial(n):

res = 1

for i in range(2, n+1):
res *= i
return res

num = 7;
print("Factorial of", num, "is",
factorial(num))```
```Output
```
``Factorial of 7 is 120``
```
QUESTIONS) Find Second largest element in an array

Input
```
``{4,7,19,17,11}``
```Solution:

PYTHON PROGRAM
```
```#include <iostream>
#include<bits/stdc++.h>
using namespace std;

int main() {

vector<int>v{4,7,19,17,11};
set<int>s(v.begin(),v.end());
v.clear();
for(auto it:s)v.push_back(it);

int n=v.size();

cout<<"The Second Largest Element in Vector is: ";
cout<<v[n-2]<<endl;
return 0;
}```
```C++ PROGRAM
```
```# your code goes here

v = [4, 7, 19, 17, 11]

s = set(v)

s = sorted(s)

print("The Second Largest Element in Vector is: ",s[-2])```
```Output
```
``The Second Largest Element in Vector is: 17` QUESTIONS) Check if the sum of digits of N is palindrome Input `
``92` Solution: PYTHON PROGRAM `
```#include <bits/stdc++.h>
using namespace std;

int main()
{
int num = 92;
int sum = 0;

while (num != 0) {
int temp = (num % 10);
sum = sum + temp;
num /= 10;
}

string str = to_string(sum);

string string_rev = "" + str;
reverse(string_rev.begin(), string_rev.end());

cout << ((str == string_rev) ? "Yes" : "No");
}
C++ PROGRAM
```
```#include <bits/stdc++.h>
using namespace std;

int main()
{
int num = 92;
int sum = 0;

while (num != 0) {
int temp = (num % 10);
sum = sum + temp;
num /= 10;
}

string str = to_string(sum);

string string_rev = "" + str;
reverse(string_rev.begin(), string_rev.end());

cout << ((str == string_rev) ? "Yes" : "No");
}

Output
```
``Yes``

Follow regularly our Dailyrecruitment.in site to get upcoming all up to date information.

### Govt Jobs by Qualifications

Education & Vacancies Salary Apply Link
10th Pass Govt Jobs - 5,000 Vacancies Rs. 5,200 - 63,200 Apply Now
12th Pass Govt Jobs - 18,000+ Vacancies Rs. 5,200 - 92,300 Apply Now
ITI Pass Jobs - 3,500 Vacancies Rs. 5,200 - 35,000 Apply Now
Any Graduate Jobs - 19,100 Vacancies Rs. 5,200 - 92,300 Apply Now
Central Govt Jobs Rs. 5,200 - 17,000 Apply Now
Bank Jobs - 1,000 Vacancies Rs. 5,200 - 29,200 Apply Now
Diploma Jobs - 9,300 Vacancies Rs. 5,200 - 35,000 Apply Now
BTech/BE Jobs - 18,000 Vacancies Rs. 15,000 - 1,00,000 Apply Now
Data Entry Jobs - 1,300 Vacancies Rs. 5,200 - 29,200 Apply Now
Private Jobs Rs. 10,000 - 67,700 Apply Now