Tip 1 : Must have good grasp of core java concepts for java profie.
Tip 2 : Practice DSA as medium level questions can be asked.
Tip 3 : Basic knowledge of Version Control Systems, Spring
Tip 1 : At least one project on resume.
Tip 2 : Good knowledge of all the things mentioned in the resume.
This round was a Online Assessment which had 4 Sections
1 - OOP's Core Java MCQs - 25 MCQ's (30 min)
2 - OOP's Core Java Coding - 1 Coding Question (35 min)
3 - DS & Algo - Medium - 1 Coding Question (35 min)
4 - DS & Algo - Hard - 1 Coding Question (50 min)



You must sell the stock before you buy it again.
The logic to solve this problem is same as "max subarray problem" using Kadane's Algorithm.
My approach ->
Initialize maxProfit as zero
Traverse the array, use low & high to store prices, whole problem can be broken down to two scenarios.
1- if we have a even lower price, we update both low & high.
2- if we have a higher price, update only high.
While traversing the array update maxProfit with maximum of high -low.
maxProfit = Max(high - low,maxProfit)
Return maxProfit



If A = [3, 2, 3], and K = 2.
Then max of [3, 2] = 3 and max of [2, 3] = 3
So, the answer will be [3, 3]
If A = [3, 2, 3, 5, 1, 7] and K = 3.
Then max of [3, 2, 3] = 3
Then max of [2, 3, 5] = 5
Then max of [3, 5, 1] = 5
Then max of [5, 1, 7] = 7
So the answer will be [3, 5, 5, 7]
Can you solve the problem in O(N) time complexity and O(K) space complexity?
Run a nested loop, the outer loop which will mark the starting point of the subarray of length k, the inner loop will run from the starting index to index+k, k elements from starting index and print the maximum element among these k elements
This was technical interviw round, the main focus was on core java features, OOP concepts and problem-solving.
Interviewer asked theoretical questions such as :-
What are the four pillars of OOP?
What do you know about the java collection framework?
How Java can support multiple inheritances?
What are Access modifiers?
What is Overloading and Overriding?
Explain Exception handling.
What is Constructor?
Explain working of HashMap?
Difference between HashMap and TreeMap?
Why we override hashcode and equals method in java?



Do not allocate extra space for another array. You need to do this by modifying the given input array in place with O(1) extra memory.
'n' = 5, 'arr' = [1 2 2 2 3].
The new array will be [1 2 3].
So our answer is 3.
Create an auxiliary array temp[] to store unique elements.
Traverse input array and one by one copy unique elements of arr[] to temp[]. Also keep track of count of unique elements. Let this count be j.
Copy j elements from temp[] to arr[] and return j



We cannot use the element at a given index twice.
Try to do this problem in O(N) time complexity.
1- Sort the array
2- Two pointers can be taken which mark the beginning and end of the array respectively. If the sum is greater than the sum of those two elements, shift the right pointer to decrease the value of the required sum and if the sum is lesser than the required value, shift the left pointer to increase the value of the required sum.
3 - Repeat the step 2 till left pointer < right pointer
Normal conversation about hobbies, projects.
Tell me about yourself?
What are your hobbies?
Tell me about your projects ?
Why do you want to join EPAM?
Tip 1: Be Confident
Tip 2: Be Honest

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?