ADP Coding Questions
About ADP India Coding Questions
This page will give you all the significant details of ADP India Coding Questions and Aptitude questions asked in Online Assessments and other details like Eligibility criteria, Package Details, working location and Interview Process of the company.
About ADP India
ADP is a global service provider of Cloud – based Human Capital Management Services Analytics Resources and Business Process Outsourcing (BPO) services. ADP has partnered with various organizations worldwide to provide highly – customizable and configurable Payroll systems , Leave Management System and Attendance Management System.
About ADP India Recruitment Process
The Hiring process ADP India consists of 4 steps:
- ADP Pariksha Test [Quantitative Aptitude and Logical Reasoning]
- Technical Round -1 [ with Manager ]
- Technical Round -2 [with Sr. Leader]
- HR Interview
For your convenience we have mentioned some details of a particular Job Profile in tabular form :
Points | Important Informations |
---|---|
Position : |
|
Course : |
|
Eligibility Criteria / Academic Qualification Required : |
|
Cost to Company (CTC) |
|
Selection Process : |
|
Joining Location : |
|
Prime Course Trailer
Related Banners
Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription
Sample ADP India Coding Questions With Solutions
Question 1 :Vampire Battle (R->Medium)
Problem statement :
Stephan is a vampire. And he is fighting with his brother Damon. Vampires get energy from human bloods, so they need to feed on human blood, killing the human beings. Stephan is also less inhuman, so he will like to take less life in his hand. Now all the people’s blood has some power, which increases the powers of the Vampire. Stephan just needs to be more powerful than Damon, killing the least human possible. Tell the total power Steohan will have after drinking the bloods before the battle.
Note that: Damon is a beast, so no human being will be left after Damon drinks everyone’s blood. But Stephan always comes early in the town.
Input Format :
First line with the number of people in the town, n.
Second line with a string with n characters, denoting the one digit power in every blood.
Output Format :
Total minimum power Stephan will gather before the battle.
Constraints :
n<=10^4
Sample input :
6
093212
Sample output:
9
Explanation :
Stephan riches the town, drinks the blood with power 9. Now Damon cannot reach 9 by drinking all the other bloods.
#include <bits/stdc++.h> using namespace std; int main() { int n, sum = 0, sum1 = 0; cin >> n; string s; cin >> s; sort(s.begin(), s.end(), greater < char > ()); for (auto i: s) sum += (i - '0'); for (auto i: s) { if (sum1 > sum) break; sum1 += (i - '0'); sum -= i - '0'; } cout << sum1; }
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String str = sc.next(); char arr[] = str.toCharArray(); int a[] = new int[arr.length]; for (int i = 0; i < a.length; i++) a[i] = Integer.parseInt(arr[i] + ""); Arrays.sort(a); int sum = 0; for (int i = 0; i < a.length; i++) sum = sum + a[i]; int sumA = 0; int sumB = sum; ArrayList < Integer > subsetA = new ArrayList < Integer > (); for (int i = a.length - 1; i >= 0; i--) { sumA = sumA + a[i]; sumB = sumB - a[i]; subsetA.add(a[i]); if (sumA > sumB) break; } Iterator itr = subsetA.iterator(); while (itr.hasNext()) { System.out.print((Integer) itr.next()); } } }
n = int(input()) ar = input() sorted(ar, reverse=True) br = [] s = 0 aa = [] for i in ar: aa.append(int(i)) su = sum(aa) while s <= su: s += aa[0] su = su - (aa[0]) br.append(aa.pop(0)) print(sum(br))
Question 2 : Array Subarray
Problem Statement :
You are given an array, You have to choose a contiguous subarray of length ‘k’, and find the minimum of that segment, return the maximum of those minimums.
Sample input :
1 → Length of segment x =1
5 → size of space n = 5
1 → space = [ 1,2,3,1,2]
2
3
1
2
Sample output :
3
Explanation :
The subarrays of size x = 1 are [1],[2],[3],[1], and [2],Because each subarray only contains 1 element, each value is minimal with respect to the subarray it is in. The maximum of these values is 3. Therefore, the answer is 3
#include <bits/stdc++.h> using namespace std; vector < int > arr; int prevmin=-1; int flag=0; int x,n,q; int sorting(int start,int end) { if(start+1==n) {start=0;end=end-n;} if(start==end) return arr[start]; return min(arr[start],sorting(start+1,end)); } int func(int start,int end) { if(flag==0) {flag++;return prevmin=sorting(start,end);} if(arr[start-1]==prevmin) return prevmin; return prevmin=(arr[end] <= prevmin)?prevmin:sorting(start,end); } int main() { cin >> x >> n; int ans=0; for(int i=0;i < n;i++) {cin >> q;arr.push_back(q);} for(int i=0;i < n;i++) { ans=max(ans,func(i,i+x-1)); } cout << ans; }
import java.util.*; public class DiskSpace { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int x=sc.nextInt(); int n=sc.nextInt(); int arr[]=new int[n]; for(int i=0;i < n;i++) arr[i]=sc.nextInt(); int min=Integer.MAX_VALUE; int max=Integer.MIN_VALUE; for(int i=0;i <= n-x;i++) { min=Integer.MAX_VALUE; for(int j=i;j < (i+x);j++) min=Math.min(min,arr[j]); max=Math.max(min,max); } System.out.println(max); } }
n=int(input()) arr=[] for i in range(n): arr.append(int(input())) s,a=0,0 for i in arr: s=s+i if(s < 1): a=a+(-1*s) s=0 print(a)
Question 3 : Duplicates
Problem statement : The principal has a problem with repetitions. Everytime someone sends the same email twice he becomes angry and starts yelling. His personal assistant filters the mails so that all the unique mails are sent only once, and if there is someone sending the same mail again and again, he deletes them. Write a program which will see the list of roll numbers of the student and find how many emails are to be deleted.
Sample Input:
6
1
3
3
4
3
3
Sample Output:
3
#include<bits/stdc++.h> using namespace std; map<int,int> m; int main() { int n,a,ans=0; cin>>n; while(n--) { cin>>a; m[a]++; if(m[a]>1) ans++; } cout<<ans; }
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); TreeSet list=new TreeSet<>(); for(int i=0;i<n;i++) list.add(sc.nextInt()); System.out.println(Math.abs(n-list.size())); } }
def countDuplicate(numbers): c=0 for i in set(numbers): if numbers.count(i)>1: c+=numbers.count(i)-1 return c n=int(input()) numbers=[] for i in range(n): numbers.append(int(input())) print(countDuplicate(numbers))
Question 4 : Array Subarray
Problem Statement :
You are given an array, You have to choose a contiguous subarray of length ‘k’, and find the minimum of that segment, return the maximum of those minimums.
Sample input 0 :
1 → Length of segment x =1
5 → size of space n = 5
1 → space = [ 1,2,3,1,2]
2
3
1
2
Sample output :
3
Explanation :
The subarrays of size x = 1 are [1],[2],[3],[1], and [2],Because each subarray only contains 1 element, each value is minimal with respect to the subarray it is in. The maximum of these values is 3. Therefore, the answer is 3
#include <bits/stdc++.h> using namespace std; vector < int > arr; int prevmin = -1; int flag = 0; int x, n, q; int sorting(int start, int end) { if (start + 1 == n) { start = 0; end = end - n; } if (start == end) return arr[start]; return min(arr[start], sorting(start + 1, end)); } int func(int start, int end) { if (flag == 0) { flag++; return prevmin = sorting(start, end); } if (arr[start - 1] == prevmin) return prevmin; return prevmin = (arr[end] <= prevmin) ? prevmin : sorting(start, end); } int main() { cin >> x >> n; int ans = 0; for (int i = 0; i < n; i++) { cin >> q; arr.push_back(q); } for (int i = 0; i < n; i++) { ans = max(ans, func(i, i + x - 1)); } cout << ans; }
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int n = sc.nextInt(); int arr[] = new int[n]; for (int i = 0; i < n; i++) arr[i] = sc.nextInt(); int min = Integer.MAX_VALUE; int max = Integer.MIN_VALUE; for (int i = 0; i <= n - x; i++) { min = Integer.MAX_VALUE; for (int j = i; j < (i + x); j++) min = Math.min(min, arr[j]); max = Math.max(min, max); } System.out.println(max); } }
s = int(input()) n = int(input()) a = [] for i in range(n): a.append(int(input())) def min_in_segment(start, end, prev, s, prev_min): if s == 1: return a[start] else: if prev == -1 or prev_min == -2: return min(a[start : end + 1]) elif prev_min != -2: if prev != prev_min: if a[end] < prev_min: return a[end] else: return prev_min else: return min(a[start : end + 1]) msf = -1 prev = -1 prev_min = -2 for i in range(n - s + 1): new_min = min_in_segment(i, i + s - 1, prev, s, prev_min) msf = max(msf, new_min) prev = a[i] prev_min = new_min print(msf)
Question 5 :Jack’s Text
Problem Statement :
Jack is learning to type english from the beginning and he is making an error of repeating the same words in his texts over whatsapp. Write a function that will take input for his text sent to you and then keep only the unique texts.
Note that, the uniqueness is about being word specific not position, there are nothing but alphabets in the sentences and words are separated only with white space.
Constraints:
Words in the line<=10^5
Alphabets in the words<=20
Sample Input:
Send send the image send to to to me
Output:
Send the mage to me
#include <bits/stdc++.h> using namespace std; int main() { int n, ans = 0; cin >> n; while (n) { n &= (n - 1); ans++; } cout << ans; }
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); String arr[] = str.split(" "); String first = arr[0]; arr[0] = arr[0].toLowerCase(); LinkedHashMap < String, Boolean > map = new LinkedHashMap < String, Boolean > (); for (int i = 0; i < arr.length; i++) map.put(arr[i], true); Set s = map.entrySet(); Iterator itr = s.iterator(); System.out.print(first + " "); int j = 0; while (itr.hasNext()) { Map.Entry m = (Map.Entry) itr.next(); if ((Boolean) m.getValue() == true && j == 1) System.out.print(m.getKey() + " "); j = 1; } } }
arr = list(input().split()) dup = [] ans = "" for i in arr: if i not in dup: dup.append(i) ans += i + " " print(ans)
FAQs on ADP Coding Questions
Question 1: Does recruiters of ADP asks Coding Questions in the Hiring process?
Yes, of course, coding questions are asked in 1st Round – Online Coding Assessments and in the next 2 Rounds of Technical Assessments during the hiring process.
Question 2: How can I prepare for the ADP HR Interview Process?
To prepare for the HR Interview, it’s a good idea to research the company and the position you’re applying for, practice answering accordingly. Also practice common interview questions, and be ready to talk about your relevant experience and technical skills.
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