Pentair Coding Questions And Answers
Most Asked Pentair Coding Questions 2023
On this page, you will find out details of the Pentair Recruitment Process which included Group Discussions and Technical Interviews. Go through this page to get other insights on the Job Profile, CTC Offered, Job Location, Steps involved in the recruitment process, etc of the company.
About Pentair
Pentair, formally known as Pentair Water India Pvt Ltd. mainly focuses on Water Quality, Water Supply – Disposal, and Water Treatment services for Residential as well Commercial or Industrial Applications.
In 1966, Pentair was founded, with a vision of being leading services and products providing company. With the passage of time, they started working in the Computer Science field, Electronics / Power Tools manufacturing, etc. In 2004, they exits the other industries including the tools business, and started focusing totally on Sustainable Water Supply and Solutions.
About Pentair Recruitment Process 2023
The Pentair Recruitment Process consists of the following steps :
- Group Discussion
- Technical Interview
- HR Interview
For more details on these 3 above mentioned steps, go through the following sections.
- Group Discussions
Pentair usually conducts Group Discussions as 1st Round as part of their Recruitment Process. They generally ask about some latest trends in Technical Fields, Social Issues, Current Affairs, etc. For more details check out the link given below:
- Technical Interview
Here Recruiters test the candidate’s technical skills, including topics like Programming Skills, Problem-Solving Skills, and other Domain Based Questions. Click on the button given below to get more details:
- HR Interview
This round is the Final Round of the Recruitment Process. Here, the HR test Personality, Strengths, Weaknesses, etc. For checking whether the candidate is suitable for Offered Role or not. Click on the button given below to get more details:
We have mentioned further details of the Pentair Recruitment Process in the following Tabular Form
Pentair India | Related Information |
---|---|
Position : |
|
Course : |
|
Eligibility Criteria / Academic Qualification Required : |
|
Pentair CTC Breakdown : | ₹ 9.36 L.P.A [ Basic Pay = ₹ 8.36 L.P.A + ₹ 1 L Variable ] |
Selection Process : |
|
Joining Location : | Noida |
Pentair Job Descriptions
Pentair Water India Pvt. Ltd. is offering 4 Job Profiles, we have discussed those Job Profiles further on this page for better understanding.
Associate Project Engineer - IoT
This Job Role requires :
- Educational Qualification: B.E. / B.Tech (Computer Science) / M.C.A / Masters in Computer Science.
- Hands on with C / Python/ C++ / Java programming.
- Knowledge of Node and Go, Data Structures, and Database.
- Ability to document the design before implementation using a flowchart, and state diagram.
- Ability to work on Windows and Linux machine.
- Strong analytical and numerical skills.
Intern IP - Electronics / IoT
This Job Role requires :
- Educational Qualification: M.E. / M.Tech. (Electronics & Communication, Electrical Engineering, or a related field).
- Conduct prior art searches and technology trends.
- Reach out and engage, with the engineering team for understanding inventions and requirements.
- Assists in various legal research projects.
- Strong Analytical skills.
- Good technical writing/documentation skills with excellent skills in English grammar and sentence construction.
Embedded Hardware Developer
This Job Role requires :
- Educational Qualification: B. Tech in Electronics/ Electrical & Electronics / Electronics and Communication/ Computer Engineering.
- Knowledge of C/C++.
- Hands on with EDA SW- Altium Designer, Orcad, P-spice, LT Spice, etc.
- Knowledge of STM32xx, PIC16/32xx, ESP32xx controller modules.
- Hands on exp. MS-office bundle.
- Skills of Arduino, R-PI, ESP32xx, based development kits.
- Knowledge of 8/16/32bit Microcontroller and Microprocessor Architectures.
- Good Knowledge of electronics components and selection criteria - Diode, Transistor, MOSFET, Op-Amp, Relay, Triac etc.
Embedded Software Developer
This Job Role requires :
- Educational Qualification: B.Tech in Computer Science / Electronics Engineering.
- Must Known C / C++ programming & MS-Office.
- Knowledge of scripting languages like shell/batch/python.
- Ability to work on Windows and Linux machine.
- Hands on with Linux and DOS commands.
- Knowledge of data structures for sorting and searching.
- Exposure to code quality, source code mgmt & bug tracking systems.
- Knowledge of Networking Concepts, Microcontroller peripherals, OS concepts & Architectures of Computer and Microcontroller.
Prime Course Trailer
Related Banners
Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription
Sample Pentair Coding Questions with Solutions
Question 1 : HR issues
Problem statement -:
Shovon is an HR in a renowned company and he is assigning people to work. Now he is assigning people work in a fashion where if he assigns somework a work of cost 2, the next person will be strictly getting a job with cost equal or more than 2. Given that Shovon’s company has infinite work and a number of employees, how many distributions can be possible. The cost of jobs can go 0 to 9.
Function Description:
Complete the special_numbers function in the editor below. It has the following parameter(s):
Parameters:
Name | Type | Description |
N | Integer | The number of depts. |
arr[ ] | Integer array | The number of employees in each dept.. |
Return: The function must return an INTEGER denoting the sum of answers for all distinct distributions.
Constraints:
- 1 <= n <= 100
- 1 <= arr[i] <= 200
Sample Cases:
- Sample Input 1
2
4
1 - Sample Output 1
725 - Description
The ans if m = 1 is 10, which is all numbers from 0 to 9
The ans for m = 2 is 55
The answer for m = 3 is 220
The answer for m = 4 is 715
So fun(4) + fun(1) = 725
#include<bits/stdc++.h> using namespace std; int func(int s,int p,int n) { if(p==n-1) return 1; int ans=0; for(int i=s;i<=9;i++) ans+=func(i,p+1,n); return ans; } int main() { int n,a, ans=0; cin>>n; vector v(n); for(int i=0;i<n;i++) { cin>>a; for(int i=0;i<=9;i++) ans+=func(i,0,a); } cout<<ans; }
n=int(input()) a1=[] for i in range(n): a1.append(int(input())) dp=[0]*201 dp[1]=10 dp[2]=55 a=[1]*10 i=3 while i<201: s=0 for i1 in range(10): s+=a[i1] a[i1]=s dp[i]+=(s*(10-i1)) dp[i]=dp[i]%((10**9)+7) i+=1 s1=0 for i in a1: s1+=dp[i] s1=s1%((10**9)+7) print(s1)
import java.util.*; class Main { static int func(int s,int p,int n) { if(p==n-1) return 1; int ans=0; for(int i=s;i<=9;i++) ans += func(i,p+1,n); return ans; } public static void main (String[]args) { Scanner sc = new Scanner (System.in); int n = sc.nextInt (); int ans=0; for(int i=0; i<n; i++){ int a = sc.nextInt (); for(int j=0; j <=9; j++) ans+=func(j,0,a); } System.out.println (ans); } }
Question 2 : Counting Rock Sample
Problem Description
Question – : Juan Marquinho is a geologist and he needs to count rock samples in order to send it to a chemical laboratory. He has a problem: The laboratory only accepts rock samples by a range of its size in ppm (parts per million).
Juan Marquinho receives the rock samples one by one and he classifies the rock samples according to the range of the laboratory. This process is very hard because the number of rock samples may be in millions.
Juan Marquinho needs your help, your task is to develop a program to get the number of rocks in each of the ranges accepted by the laboratory.
Input Format: An positive integer S (the number of rock samples) separated by a blank space, and a positive integer R (the number of ranges of the laboratory); A list of the sizes of S samples (in ppm), as positive integers separated by space R lines where the ith line containing two positive integers, space separated, indicating the minimum size and maximum size respectively of the ith range.
Output Format: R lines where the ith line contains a single non-negative integer indicating the number of the samples which lie in the ith range.
Constraints:
- 10 <= S <= 10000
- 1 <= R <= 1000000
- 1<=size of Sample <= 1000
Example 1
- Input: 10 2
- 345 604 321 433 704 470 808 718 517 811
- 300 350
- 400 700
Output: 2 4
Explanation:
There are 10 samples (S) and 2 ranges ( R ). The samples are 345, 604,811. The ranges are 300-350 and 400-700. There are 2 samples in the first range (345 and 321) and 4 samples in the second range (604, 433, 470, 517). Hence the two lines of the output are 2 and 4
Example 2
- Input: 20 3
- 921 107 270 631 926 543 589 520 595 93 873 424 759 537 458 614 725 842 575 195
- 1 100
- 50 600
- 1 1000
Output: 1 12 20
Explanation:
There are 20 samples and 3 ranges. The samples are 921, 107 195. The ranges are 1-100, 50-600 and 1-1000. Note that the ranges are overlapping. The number of samples in each of the three ranges are 1, 12 and 20 respectively. Hence the three lines of the output are 1, 12 and 20.
#include int main() { int a[1000],s,i,j,t,l1,l2,c=0; printf("Enter the number of elements : "); scanf("%d",&s); printf("Enter the number of ranges : "); scanf("%d",&t); printf("Enter the elements : "); for(i=0;i<s;i++) scanf("%d",&a[i]); printf("Enter the range : "); for(i=0;i<t;i++) { scanf("%d %d",&l1,&l2); for(j=0;j<s;j++) { if((a[j]>=l1)&&(a[j]<=l2)) c++; } printf("The desired output %d ",c); c=0; } return 0; }
Output 10 2 345 604 321 433 704 470 808 718 517 811 300 350 400 700 2 4
#include using namespace std; int main() { int a[1000],s,i,j,t,l1,l2,c=0; cout<<("Enter the number of elements : "); cin>>s; cout<<("Enter the number of ranges : "); cin>>t; cout<<("Enter the elements : "); for(i=0;i<s;i++) cin>>a[i]; cout<<("Enter the range : "); for(i=0;i<t;i++) { cin>>l1>>l2; for(j=0;j<s;j++) { if((a[j]>=l1)&&(a[j]<=l2)) c++; } cout<<("The desired output %d ",c); c=0; } return 0; }
Output Enter the number of elements : 10 Enter the number of ranges : 2 Enter the elements : 345 604 321 433 704 470 808 718 517 811 Enter the ranges : 300 350 400 700 The desired Output : 2 4
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] a = new int[1000]; int s,i,j,t,l1=0,l2=0,c=0; System.out.println("Enter the no of sample"); s = sc.nextInt(); System.out.println("Enter the no of range"); t = sc.nextInt(); System.out.println("Enter the numbers"); for (i = 0; i < s; i++) { a[i] = sc.nextInt(); } for (i = 0; i< t; i++) { System.out.println("Enter the max and min range"); l1 = sc.nextInt(); l2 = sc.nextInt(); for (j = 0; j < s; j++) { if((a[j]>=l1)&&(a[j]<=l2)) c++; } System.out.println(c); c=0; } } }
samples, ranges =[int(i) for i in input().split()] count = 0 final = [] arr = list(map(int, input().split())) for i in range(0, ranges): range1, range2 = [int(i) for i in input().split()] for j in range(0, samples): if range1 <= arr[j] <= range2: count = count + 1 final.append(count) count = 0 for i in range(0, len(final)): print(final[i], end=" ")
Output 10 2 345 604 321 433 704 470 808 718 517 811 300 350 400 700 2 4
Question 3: Stock Marketing
You are given a list of daily prices of a stock. You can buy a stock on one day and sell it later on another day after the day you bought the stock. You can perform the above operation only once. What is the maximum loss possible?
Example
Prices=[10,4,2,9]
The greatest loss is incurred when you buy at a price of 10 and sell at a price of 2.Return the difference:9.
Example
Price=[1,2,3,4]
The Price went up everyday.Return 0.
Sample Input for Custom Testing
STDIN Function
———– ————–
- 7 → prices [] size n=7
- 1 → prices =[1,8,4,2,10,3,2]
- 8
- 4
- 2
- 10
- 3
- 2
Sample Output
- 8
Explanation
Using zero-based index notation,the correct answer is a[4]-a[6]=10-2=8.There is a greater difference between 10 and 1 but that would imply selling before buying,and short selling is not allowed in this problem.
#include<bits/stdc++.h> #define ll long long using namespace std; int solve(vector v) { int n = v.size(); if (n == 0) return 0; int mx = v[0]; for (int i = 1; i < n; i++) mx = max(mx, v[i]); if (mx <= 0) return 0; int mxSum = 0; int cSum = 0; for (int i = 0; i < n; i++) { cSum += v[i]; if (cSum < 0) cSum = 0; mxSum = max(mxSum, cSum); } return mxSum; } int main() { int n; cin >> n; int price[n]; for (int i = 0; i < n; i++) { cin >> price[i]; } vector diff; for (int i = n-2; i >=0 ; i--) diff.push_back(price[i] - price[i+1]); int ans = solve(diff); if(ans<0) { cout<<0<< endl; } else { cout<< ans<< endl; } return 0; }
n=int(input()) arr=[] ans=[0] for i in range(n): arr.append(int(input())) for i in range(n-1): x=min(arr[i+1:])-arr[i] if x<0: ans.append(x) print(-1*min(ans))
import java.util.*; class Solution { public static int solve(ArrayList < Integer > list) { int n = list.size(); if (n == 0) return 0; int max = list.get(0); for (int i = 1; i < n; i++) max = Math.max(max, list.get(i)); if (max <= 0) return 0; int maxSum = 0; int sum = 0; for (int i = 0; i < n; i++) { sum = sum + list.get(i); if (sum < 0) sum = 0; maxSum = Math.max(maxSum, sum); } return maxSum; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int arr[] = new int[n]; for (int i = 0; i < n; i++) arr[i] = sc.nextInt(); ArrayList < Integer > list = new ArrayList(); for (int i = n - 2; i >= 0; i--) list.add(arr[i] - arr[i + 1]); int res = solve(list); if (res < 0) System.out.println(0); else System.out.println(res); } }
Question 4
You just received another bill which you cannot pay because you lack the money.
Unfortunately, this is not the first time to happen, and now you decide to investigate the cause of your constant monetary shortness. The reason is quite obvious: the lion’s share of your money routinely disappears at the entrance of party localities.
You make up your mind to solve the problem where it arises, namely at the parties themselves. You introduce a limit for your party budget and try to have the most possible fun with regard to this limit.
You inquire beforehand about the entrance fee to each party and estimate how much fun you might have there. The list is readily compiled, but how do you actually pick the parties that give you the most fun and do not exceed your budget?
Write a program which finds this optimal set of parties that offer the most fun. Keep in mind that your budget need not necessarily be reached exactly. Achieve the highest possible fun level, and do not spend more money than is absolutely necessary.
Input
- The first line of the input specifies your party budget and the number n of parties.
- The following n lines contain two numbers each. The first number indicates the entrance fee of each party. Parties cost between 5 and 25 francs. The second number indicates the amount of fun of each party, given as an integer number ranging from 0 to 10.
- The budget will not exceed 500 and there will be at most 100 parties. All numbers are separated by a single space.
- There are many test cases. Input ends with 0 0.
Output
- For each test case, your program must output the sum of the entrance fees and the sum of all fun values of an optimal solution. Both numbers must be separated by a single space.
Example
- Sample input:
50 10
12 3
5 8
16 9
16 6
10 2
21 9
18 4
12 4
17 8
18 9
50 10
13 8
19 10
16 8
12 9
10 2
12 8
13 5
15 5
11 7
16 2
0 0
- Sample output:
50 29
48 32
def knapSack(W, wt, val, n): K = [[0 for x in range(W + 1)] for x in range(n + 1)] for i in range(n + 1): for w in range(W + 1): if i == 0 or w == 0: K[i][w] = 0 elif wt[i-1] <= w: K[i][w] = max(val[i-1] + K[i-1][w-wt[i-1]], K[i-1][w]) else: K[i][w] = K[i-1][w] res = K[n][W] res1=res x=0 w = W for i in range(W+1): if(K[n][i]==res): x=i break print(x , res1) b,n=map(int,input().split()) fun=[] cost=[] for i in range(n): x,y=map(int,input().split()) fun.append(y) cost.append(x) (knapSack(b,cost,fun,n))
import java.util.*; class Solution { public static void main (String[]args) { Scanner sc = new Scanner (System.in); while (true) { int budget = sc.nextInt (); int n = sc.nextInt (); if (budget == 0 && n == 0) break; int cost[] = new int[n + 1]; int fun[] = new int[n + 1]; int arr[][] = new int[n + 1][budget + 1]; for (int i = 0; i < n; i++) { cost[i] = sc.nextInt (); fun[i] = sc.nextInt (); } for (int i = 0; i <= n; i++) for (int j = 0; j <= budget; j++) arr[i][j] = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= budget; j++) if (cost[i - 1] <= j) arr[i][j] =Math.max (fun[i - 1] + arr[i - 1][j - cost[i - 1]],arr[i - 1][j]); else arr[i][j] = arr[i - 1][j]; } int c = 0; for (int i = 0; i <= budget; i++) { if (arr[n][i] == arr[n][budget]) { c = i; break; } } System.out.println (c + " " + arr[n][budget]); } } }
#includeusing namespace std; int main() { int w, n; x: cin >> w >> n; if (w == 0 and n == 0) goto r; else { int ct[n], val[n]; for (int i = 0; i < n; i++) { cin >> ct[i] >> val[i]; } int t[n + 1][w + 1]; for (int i = 0; i <= n; i++) { for (int j = 0; j <= w; j++) t[i][j] = 0; } for (int i = 1; i <= n; i++) { for (int j = 1; j <= w; j++) { if (ct[i - 1] <= j) t[i][j] = max(val[i - 1] + t[i - 1][j - ct[i - 1]], t[i - 1][j]); else t[i][j] = t[i - 1][j]; } } int cost = 0; for (int i = 0; i <= w; i++) { if (t[n][i] == t[n][w]) { cost = i; break; } } cout << cost << " " << t[n][w] << endl; goto x; } r: return 0; }
Question 5 : Airport Authority
Problem Statement -:
In an airport, the Airport authority decides to charge a minimum amount to the passengers who are carrying luggage with them. They set a threshold weight value, say, T, if the luggage exceeds the weight threshold you should pay double the base amount. If it is less than or equal to threshold then you have to pay $1.
Function Description:
Complete the weightMachine function in the editor below. It has the following parameter(s):
Parameters:
Name | Type | Description |
N | Integer | number of luggage |
T | Integer | weight of each luggage |
weights[ ] | Integer array | threshold weight |
Returns: The function must return an INTEGER denoting the required amount to be paid.
Constraints:
- 1 <= N <= 10^5
- 1 <= weights[i] <= 10^5
- 1 <= T <= 10^5
Input Format for Custom Testing:
- The first line contains an integer, N, denoting the number of luggage.
- Each line i of the N subsequent lines (where 0 <= i <n) contains an integer describing the weight of ith luggage.
- The next line contains an integer, T, denoting the threshold weight of the boundary wall.
Sample Cases:
- Sample Input 1
4
1
2
3
4
3 - Sample Output 1
5 - Explanation:
Here all weights are less than threshold weight except the luggage with weight 4 (at index 3) so all pays base fare and it pays double fare.
#include<stdio.h> long int weightMachine(long int N,long int weights[],long int T) { long int amount=0,i; for(i=0;i<N;i++) { amount++; if(weights[i]>T) { amount++; } } return amount; } int main() { long int N,i,T; scanf("%ld",&N); long int weights[N]; for(i=0;i<N;i++) { scanf("%ld",&weights[i]); } scanf("%ld",&T); printf("%ld",weightMachine(N,weights,T)); return 0; }
#include <bits/stdc++.h> using namespace std; long int weightMachine(long int N,long int weights[],long int T) { long int amount=0,i; for(i=0;i<N;i++) { amount++; if(weights[i]>T) { amount++; } } return amount; } int main() { long int N,i,T; cin>>N; long int weights[N]; for(i=0;i<N;i++) { cin>>weights[i]; } cin>>T; cout<<weightMachine(N,weights,T); return 0; }
import java.util.*; class Main { static int weightMachine (int N, int weights[],int T) { int amount = 0, i; for (i = 0; i < N; i++) { amount++; if (weights[i] > T) { amount++; } } return amount; } public static void main (String[]args) { Scanner sc = new Scanner (System.in); int n = sc.nextInt (); int weights[]= new int[n]; for(int i=0; i<n; i++) weights[i] = sc.nextInt(); int t = sc.nextInt (); System.out.println (weightMachine(n, weights, t)); } }
def weightMachine(N,weights,T): amount=0 for i in weights: amount+=1 if(i>T): amount+=1 return amount N=int(input()) weights=[] for i in range(N): weights.append(int(input())) T=int(input()) print(weightMachine(N,weights,T))
FAQs on Pentair Coding Questions with Solutions
Question 1: How many rounds are there in the Pentair recruitment process?
Total rounds in the Pentair Recruitment Process:-
- Group Discussion
- Technical Interview
- HR Interview
Question 2: Is Pentair exam difficult to crack?
Pentair exam is difficult as they do not have mass hiring they will only select candidates who are performing exceptionally well in the exams.
Get over 200+ course One Subscription
Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others
Login/Signup to comment