Add office photos
Engaged Employer

Amazon

4.1
based on 24.3k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

10+ EPAM Systems Interview Questions and Answers

Updated 14 Jan 2025
Popular Designations

Q1. Say you're dealing with really long integers. They're too long to fit into a regular datatype, so linked lists are used to store them, with each node of the list containing one digit. Now the problem is, given ...

read more
Ans.

Given two linked lists representing long integers, perform addition operation.

  • Traverse both linked lists simultaneously, starting from the head.

  • Perform addition of corresponding digits and keep track of carry.

  • Create a new linked list to store the result.

  • Handle cases where one list is longer than the other.

  • Handle the final carry if any.

View 1 answer

Q2. Given a linked list (singly-linked, non-circular), swap the kth node with the kth last node in the list. Note that the length of the list is not known.

Ans.

Swap kth node with kth last node in a singly-linked, non-circular linked list.

  • Traverse the linked list to find its length or use two pointers to find kth and kth last nodes.

  • Swap the nodes and update the pointers accordingly.

  • Handle edge cases such as k being out of bounds or kth and kth last nodes being the same.

  • Consider using recursion to traverse the linked list.

Add your answer

Q3. long numbers, add the two numbers and store the result in a third linked list. 2/2

Ans.

Add two long numbers and store the result in a third linked list.

  • Create a linked list to store the result

  • Traverse both input linked lists simultaneously, adding corresponding digits

  • Handle carry over from addition

  • If one linked list is longer than the other, handle remaining digits

  • Return the resulting linked list

Add your answer

Q4. Given a Binary Search Tree, print the kth last node in inorder traversal of the tree

Ans.

To print the kth last node in inorder traversal of a Binary Search Tree, we can use a modified inorder traversal algorithm.

  • Perform an inorder traversal of the BST, keeping track of the nodes visited in a stack.

  • Once the traversal is complete, pop k elements from the stack to get the kth last node.

  • Print the value of the kth last node.

Add your answer
Discover EPAM Systems interview dos and don'ts from real experiences

Q5. What are hamming distance and hamming weights? Write code to calculate hamming distance between 2 numbers.

Ans.

Hamming distance is the number of differing bits between two binary strings. Hamming weight is the number of 1s in a binary string.

  • Hamming distance is used in error detection and correction codes.

  • Hamming weight is also known as population count or popcount.

  • To calculate hamming distance, XOR two numbers and count the number of 1s in the result.

  • Example: Hamming distance between 1010 and 1110 is 1.

  • Example: Hamming weight of 1010 is 2.

Add your answer

Q6. List some sorting algorithms. Why time complexity of merge sort is O(nlogn)

Ans.

Sorting algorithms include bubble sort, insertion sort, selection sort, quick sort, merge sort, etc. Merge sort has O(nlogn) time complexity.

  • Sorting algorithms are used to arrange data in a specific order.

  • Merge sort is a divide and conquer algorithm that divides the input array into two halves, sorts each half, and then merges the sorted halves.

  • The time complexity of merge sort is O(nlogn) because it divides the input array into halves recursively until the base case is reach...read more

Add your answer
Are these interview questions helpful?

Q7. What data structure do you know? Advantages and disadvantages of singly and doubly linked lists

Ans.

Singly and doubly linked lists are linear data structures used to store and manipulate data.

  • Singly linked lists use less memory than doubly linked lists

  • Doubly linked lists allow for traversal in both directions

  • Singly linked lists are faster for insertion and deletion at the beginning of the list

  • Doubly linked lists are faster for insertion and deletion in the middle of the list

  • Both have O(n) time complexity for searching

Add your answer

Q8. Given an array, what is the sum of the products of all subsequences?

Ans.

The sum of the products of all subsequences in an array of strings.

  • Calculate the product of all elements in the array

  • Calculate the product of all possible subsequences

  • Sum up all the products of subsequences

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. What pattern have you followed while building modules.

Ans.

I have followed the modular design pattern while building modules.

  • I break down the software into smaller, independent modules that can be easily managed and maintained.

  • I ensure each module has a clear purpose and well-defined interfaces for communication with other modules.

  • I use techniques like encapsulation, abstraction, and separation of concerns to create modular designs.

  • Example: Using the MVC (Model-View-Controller) pattern to separate the presentation, business logic, an...read more

Add your answer

Q10. write a program for Trapping Rain Water . what is time complexity of the program

Ans.

The program calculates the amount of rainwater that can be trapped between buildings given an array of heights.

  • Use two pointers to iterate from left and right towards the middle

  • Keep track of the maximum height on the left and right for each pointer

  • Calculate the trapped water at each index based on the minimum of the maximum heights on left and right

  • Sum up the trapped water at each index to get the total trapped water

Add your answer

Q11. write a program to find out Diameter of Tree what is time complexity of the program

Ans.

Program to find diameter of a tree and its time complexity

  • Use Depth First Search (DFS) to find the longest path in the tree

  • Calculate the diameter by summing the heights of the left and right subtrees for each node

  • Time complexity is O(n) where n is the number of nodes in the tree

Add your answer

Q12. LC: to delete the nth node in a linked list.

Ans.

Delete the nth node in a linked list.

  • Traverse the linked list to find the nth node and keep track of the previous node.

  • Update the previous node's next pointer to skip the nth node.

  • Free the memory allocated to the nth node.

Add your answer

Q13. System design on my done projects.

Ans.

Designed a system for a project involving real-time data processing and analysis.

  • Utilized microservices architecture for scalability and flexibility

  • Implemented message queues for asynchronous communication between components

  • Used a combination of relational and NoSQL databases for different data storage needs

Add your answer

Q14. Print boundary nodes of a tree

Ans.

Print the boundary nodes of a tree.

  • Boundary nodes are the leftmost and rightmost nodes of each level of the tree and the leaf nodes that are not part of the subtree.

  • Traverse the tree in a clockwise direction and print the nodes as you encounter them.

  • Use recursion to traverse the tree and keep track of the level and whether the node is a left or right boundary node.

Add your answer

Q15. Binary Tree medium level problem

Ans.

The question involves solving a medium level problem related to binary trees.

  • Understand the basic concepts of binary trees such as nodes, edges, and traversal methods.

  • Practice implementing common operations on binary trees like insertion, deletion, and searching.

  • Consider using recursion to solve problems involving binary trees.

  • An example of a medium level problem could be finding the lowest common ancestor of two nodes in a binary tree.

Add your answer

Q16. Boundary Traversal Of tree

Ans.

Boundary Traversal Of tree

  • Boundary traversal of a tree involves visiting the nodes of the tree in a specific order

  • The order is: left boundary, leaf nodes, and right boundary

  • We can use a combination of pre-order, in-order, and post-order traversals to achieve this

  • Start with the root node and recursively traverse the left subtree, printing the nodes

  • Then traverse the leaf nodes using an in-order traversal

  • Finally, traverse the right subtree in a post-order traversal and print the...read more

Add your answer

Q17. Possible Parenthesis

Ans.

The question is asking for the possible combinations of valid parentheses.

  • Use backtracking to generate all possible combinations of parentheses.

  • Keep track of the number of open and close parentheses to ensure they are balanced.

  • Exclude invalid combinations where close parentheses appear before open parentheses.

Add your answer

Q18. Find Peak Element

Ans.

Find Peak Element

  • A peak element is an element that is greater than its neighbors

  • The problem can be solved using binary search

  • If the middle element is smaller than its neighbors, then there must be a peak on the right side

  • If the middle element is greater than its neighbors, then there must be a peak on the left side

  • Repeat the process on the corresponding side until a peak element is found

Add your answer

More about working at Amazon

Top Rated Mega Company - 2024
Top Rated Company for Women - 2024
Top Rated Internet/Product Company - 2024
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at EPAM Systems

based on 15 interviews in the last 1 year
2 Interview rounds
Coding Test Round
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter