EPAM Coding Questions will help you to prepare yourself to appear for recruitment drives hiring for the designation of Junior Software Engineer and Junior Software Test Automation Engineer.
The page is specifically designed to make a clearer picture about both the roles in the candidate’s mind. The company provides an opportunity to both CS & IT Students and students not belonging to the mentioned branches.
About EPAM
A technological firm called EPAM Systems Inc (EPAM Systems) provides software engineering services for the creation of digital platforms and software. The business offers services for seamless back-end technologies, data-driven business choices, and consumer experiences.
EPAM Hiring Process
Here we have bulleted everything regarding the EPAM Recruitment Process. Going trough each process is mandatory and every round is an elimination round.
MyAnatomy will conduct initial screening for the eligible students.
EPAM will collect screened students from MyAnatomy and will conduct further rounds of assessments.
Choco, a chocolate lover, has N amount of money with him. He wants to buy as much chocolate as possible. So, he goes to a chocolate shop “Bandyman ”. Mike, the owner of “Bandyman ” has different types of chocolate in his store (represented by a character) placed in a row.
Mike, give an offer to Choco that he can buy a selected type of chocolate for free and need to pay for the other types of chocolates and Choco can only buy consecutive chocolates.
Now, you need to write a code to find the maximum amount of chocolates Choco can get by selecting the chocolates optimally.
Input format :
1st line contains 2 space separated integers A and B denoting the number of chocolates and the amount of money Choco has.
The 2nd line contains A chocolates represented by a string. All chocolates represented by lowercase alphabets.
The 3rd line represents 26 space separated integers representing the cost to buy the chocolates. [First integer represents the cost of the chocolate of type ‘a’, 2nd integer represents the cost of the chocolates of type ‘b’ and so on]
Output format : Print the maximum number of chocolates Choco can buy.
Constraints : 1<=A<=10^5 1<=B<=10^9 1<=cost of chocolate<=10^9
Choco can select the chocolate of type ‘a’ for free and start buying from index 0 and if he buys “aabc” then he has to pay less (0+0+4+4=8) than the total money he has.
This is the maximum number of chocolates he can get in this case.
#include<bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
string s, s1;
cin >> s;
cin.ignore();
getline(cin, s1);
istringstream ss(s1);
vector < int > a;
vector < char > a1;
while (ss) {
string w;
ss >> w;
if (w == "") break;
a.push_back(stoi(w));
}
map < char, int > mm;
for (auto i: s)
if (mm[i] == 0) {
mm[i]++;
a1.push_back(i);
}
int t = 0;
for (auto i: a1) {
vector < int > a2;
for (auto i1: s) {
if (i1 == i) a2.push_back(0);
else a2.push_back(a[i1 - 97]);
}
int l = 0, su = 0;
for (int i2 = 0; i2 < n; i2++) { if (l == i2) su += a2[i2]; else su += a2[i2]; if (su > m) {
while (su > m && l <= i2) { su -= a2[l]; l++; } } if (i2 - l + 1 > t) t = i2 - l + 1;
}
}
cout << t;
}
n, m = map(int, input().split())
s = input().strip()
a = list(map(int, input().split()))
s1 = set()
for i in s:
if i not in s1:
s1.add(i)
s1 = list(s1)
t = 0
for i in s1:
a1 = []
for i1 in s:
if i1 == i:
a1.append(0)
else:
a1.append(a[ord(i1) - 97])
l = 0
su = 0
for i2 in range(n):
if l == i2:
su = a1[i2]
else:
su += a1[i2]
if su > m:
while su > m and l <= i2: su -= a1[l] l += 1 if (i2 - l + 1) > t:
t = i2 - l + 1
print(t)
Question 2 : Minimum Occurrence (R->Medium)
Problem Statement :
Given a sting , return the character that appears the minimum number of times in the string. The string will contain only ascii characters, from the ranges (“a”-”z”,”A”-”Z”,0-9), and case matters . If there is a tie in the minimum number of times a character appears in the string return the character that appears first in the string.
Input Format : Single line with no space denoting the input string.
Output Format : Single character denoting the least frequent character.
Constraints : Length of string <=10^6
Sample Input : cdadcda
Sample Output : c
Explanation : C and A both are with minimum frequency. So c is the answer because it comes first with less index.
#include <bits/stdc++.h>
using namespace std;
unordered_map < char, int > F;
int main() {
string s;
int m = INT_MAX;
cin >> s;
for (auto i: s) F[i]++;
for (auto i: F) m = min(m, i.second);
for (auto i: s)
if (F[i] == m) {
cout << i;
break;
}
}
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
char arr[] = str.toCharArray();
int temp[] = new int[256];
for (int i = 0; i < arr.length; i++) { temp[arr[i]]++; } int min = Integer.MAX_VALUE; int index = 0; for (int i = 255; i >= 0; i--) {
if (temp[i] == 0)
continue;
min = Math.min(min, temp[i]);
}
for (int i = 0; i < arr.length; i++) {
if (min == temp[arr[i]]) {
System.out.println(arr[i]);
break;
}
}
}
}
s = input()
ans = []
for i in s:
ans.append(s.count(i))
print(s[ans.index(min(ans))])
Question 3: Password ASCII
Problem statement : Aman, who is working at a software company forgot the password of his Linkedin id.But he knows the ASCII values of his password in reverse order. Help aman to find the password. To decode the password, first reverse the string of digits, then successively pick valid values from the string and convert them to their ASCII equivalents. Some of the values will have two digits, and others three. Use the ranges of valid values when decoding the string of digits.
Some of the ASCII values are given with their characters:
The ASCII value of A to Z is 65 to 90.
The ASCII value of a to z is 97 to 122.
The ASCII value of space characters is 32.
Note: The password only has alphabets and blank spaces.
Given a string , decode the password by following the steps mentioned above.
Constraints:
1<= |s| <=10^5
s[i] is an ascii character in the range [A-Za-z] or a space character
Sample Input:
796115110113721110141108
Sample Output:
PrepInsta
Explanation
The reversed string will be 801141011127311011511697, which if analysed as ascii will be “PrepInsta”
s = input()
s = s[::-1]
i = 0
res = ""
while(i<len(s)-1):
x = s[i]+s[i+1]
if x == "32":
res += " "
elif int(x) in range(65,91) or int(x) in range(97,100):
res += chr(int(x))
elif i+2<len(s):
x = x+s[i+2]
res += chr(int(x))
i += 1
i += 2
print(res)
Question 4 : Match
Problem Statement : The number of goals achieved by two football teams in matches in a league is given in the form of two lists. For each match of team B. Compute the total number of matches of team A where team A has scored less than or equal to the number of goals scored by team B in that match.
Example : team A =[ 1,2,3] team B =[ 2,4] Team A has played three matches and has scored team A =[1,2,3] goals in each match respectively. Team B has played two matches and has scored team B = [2,4] goals in each match respectively. For 2 goals scored by team B in its first match, team A has 2 matches with scores 1,2 and 3 hence , the answer is [2,3].
Function Description :
Complete the function counts in the editor below.
Counts has the following parameters: int teamA(n): First array of positive integers int teamB(m): Second array of positive integers
Return : int(m): an array of m positive integers, one for each teamB[i] representing the total number of elements from teamA[j] satisfying teamA[j]<_ teamB[i] where 0<_j
Input format for custom Testing : Input from stdin will be processed as follows and passed to the functions.
The first line contains an integer n, the number of elements in teamA. The next n lines each contain an integer describing teamA[j] where 0<_j<n. The next line contains an integer m, the number of elements in teamB. The next m lines each contain an integer describing teamB[i]where 0<_i<m.
Explanation 0 : Given values are n =4, team A = [1,4,2,4], m= 2, and teamB = [3,5]. For teamB[0] = 3, we have 2 elements in teamA(teamA[0] = 1 and teamA[2] = 2) that are <_ teamB[0]. For teamB[1] = 5, we have 4 elements in teamA(teamA[0] = 1, teams[1] =4, teamA[2] = 2, and teamA[3] =4) that are <_teamB[1]. Thus , the function returns the array [2,4] as the answer.
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int teamA[] = new int[n];
for (int i = 0; i < n; i++)
teamA[i] = sc.nextInt();
int m = sc.nextInt();
int teamB[] = new int[m];
for (int i = 0; i < m; i++)
teamB[i] = sc.nextInt();
Arrays.sort(teamA);
int count = 0;
for (int i = 0; i < m; i++) {
count = 0;
for (int j = 0; j < n; j++) {
if (teamA[j] <= teamB[i])
count++;
else
break;
}
System.out.println(count);
}
}
}
ar=list(map(int,input().split()))
br=list(map(int,input().split()))
ar.sort()
ans=[]
import bisect
for i in br:
ans.append(bisect.bisect(ar,i))
print(ans)
Question 5 : Guess the word
Problem Statement :
Kochouseph Chittilappilly went to Dhruv Zplanet , a gaming space, with his friends and played a game called “Guess the Word”. Rules of games are – Computer displays some strings on the screen and the player should pick one string / word if this word matches with the random word that the computer picks then the player is declared as Winner. Kochouseph Chittilappilly’s friends played the game and no one won the game. This is Kochouseph Chittilappilly’s turn to play and he decided to must win the game. What he observed from his friend’s game is that the computer is picking up the string whose length is odd and also that should be maximum. Due to system failure computers sometimes cannot generate odd length words. In such cases you will lose the game anyways and it displays “better luck next time”. He needs your help. Check below cases for better understand
Sample input 0: 5 → number of strings Hello Good morning Welcome you Sample output 0: morning
Explanation:
Hello → 5 Good → 4 Morning → 7 Welcome → 7 You → 3 First word that is picked by computer is morning
Sample input 1: 3 Go to hell Sample output 1: Better luck next time Explanation: Here no word with odd length so computer confuses and gives better luck next time
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string a, result = "";
while (n--) {
cin >> a;
if (a.length() & 1)
if (a.length() > result.length())
result = a;
}
if (result == "") cout << "Better luck next time";
else cout << result;
}
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String arr[] = new String[n];
for (int i = 0; i < n; i++)
arr[i] = sc.next();
int len = 0;
ArrayList < String > oddLength = new ArrayList < String > ();
for (int i = 0; i < n; i++) { len = arr[i].length(); if (len % 2 == 1) oddLength.add(arr[i]); } if (oddLength.size() == 0) System.out.println("Better luck next time"); else { Iterator itr = oddLength.iterator(); int max = -1; String res = ""; while (itr.hasNext()) { String temp = (String) itr.next(); if (temp.length() > max) {
res = temp;
max = temp.length();
}
}
System.out.println(res);
}
}
}
n = int(input())
L = list(map(str, input().split()))
result = ""
for a in L:
if len(a) & 1:
if len(a) > len(result):
result = a
if result == "":
result = "Better luck next time"
print(result)
FAQs on EPAM Coding Questions
Question 1: What kind of positions are available at EPAM?
EPAM offers various positions in fields of software development, engineering, design, project management, business analysis, and quality assurance.
Question 2: How long does the recruitment process take?
The duration of recruitment process at EPAM can vary depending on the position and location. Generally, the process can take anywhere from a few weeks to a few months maximum.
Question 3: What is the recruitment process like at EPAM?
The recruitment process at EPAM typically involves a coding test on MyAnatomy, Group Discussions, Technical Test & Interview, and HR interview. The specific steps in the process may vary depending on the position and location.
Login/Signup to comment