Pegasystems interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Pegasystems
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I was not exceptionally good at coding at the start. Then, I solved more than 400 questions on Code Studio. Now, I can crack most of the interviews I give.
Application story
Company organizes a nationwide test for the selection, i have applied on the company website for the same.
Why selected/rejected for the role?
I was rejected because i do not have good projects in my resume and do not have that much good knowledge of the Data structure and Algorithm.
Preparation
Duration: 6 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date17 Mar 2023
Coding problem2

1. Kth smallest element in an unsorted array

Moderate
15m average time
85% success
0/80
Asked in companies
DelhiveryAmazonGrab

Given an unsorted array ‘arr’ of distinct integers and an integer ‘k’, your task is to find the ‘k-th’ smallest element in the array.

Example:
n = 5, k = 2 and arr[] = {6, 5, 4, 8, 7}
The array elements in sorted order are [4, 5, 6, 7, 8]. The ‘2-nd’ smallest element in the array is 5, so the answer is 5.
Note:
1. Don’t print anything. Return the value of ‘k-th’ smallest element.
2. ‘k’ is a positive integer and not greater than the size of the array.
3. The array ‘arr’ is unsorted, and all the elements of the array are distinct.
Problem approach

Follow the given steps to solve the problem:
Sort the input array in the increasing order.
Return the element at the K-1 index (0 – Based indexing) in the sorted array.

Try solving now

2. Equilibrium Index

Easy
0/40
Asked in companies
Expedia GroupCoinbaseGoldman Sachs

You are given an array Arr consisting of N integers. You need to find the equilibrium index of the array.

An index is considered as an equilibrium index if the sum of elements of the array to the left of that index is equal to the sum of elements to the right of it.

Note:

1. The array follows 0-based indexing, so you need to return the 0-based index of the element.
2. Note that the element at the equilibrium index won’t be considered for either left sum or right sum.
3. If there are multiple indices which satisfy the given condition, then return the left-most index i.e if there are indices i,j,k…. which are equilibrium indices, return the minimum among them
4. If no such index is present in the array, return -1.
Problem approach

Use two loops. The Outer loop iterates through all the element and inner loop finds out whether the current index picked by the outer loop is equilibrium index or not.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date17 Mar 2023
Coding problem2

1. Common Elements In Three Sorted Arrays

Moderate
35m average time
65% success
0/80
Asked in companies
MicrosoftOptumSAP Labs

You are given three arrays 'A', 'B' and 'C' of length 'N', 'M' and 'K' respectively. All the three arrays are sorted in non-decreasing order. Your task is to find all such elements which are present in all the three given arrays.

Note:

1. The output array should have the same ordering of elements as the original arrays.
2. Even if a particular element appears more than once in each of the three arrays, it should still be present only once in the output array.
3. If there are no common elements in the arrays, return an empty array.

For example:

Consider the three arrays A = [ 2, 3, 4, 7 ] , B = [ 0, 0, 3, 5 ] , C = [ 1, 3, 8, 9 ]
The output array should be [ 3 ] as 3 is the only element which is present in all the three arrays.
Problem approach

A Better Solution is to use Binary Search. 
1) Iterate over all elements of A[].
a) Binary search for element just smaller than or equal to in B[] and C[], and note the difference. 
2) Repeat step 1 for B[] and C[]. 
3) Return overall minimum.
Time complexity of this solution is O(nLogn).

Try solving now

2. Count Derangements

Moderate
35m average time
60% success
0/80
Asked in companies
Info Edge India (Naukri.com)OLX GroupAmazon

A Derangement is a permutation of ‘N’ elements, such that no element appears in its original position. For example, an instance of derangement of {0, 1, 2, 3} is {2, 3, 1, 0}, because 2 present at index 0 is not at its initial position which is 2 and similarly for other elements of the sequence.

Given a number ‘N’, find the total number of derangements possible of a set of 'N’ elements.

Note:
The answer could be very large, output answer %(10 ^ 9 + 7).
Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date17 Mar 2023
Coding problem2

1. Shortest Path In A Binary Maze

Moderate
30m average time
75% success
0/80
Asked in companies
SamsungAmazonHSBC

Given a maze in the form of a binary rectangular matrix of size M*N, where each element can either be 0 or 1, the task is to find the length of the shortest path in a maze from a given source cell to a destination cell.

The path can only be created out of a cell if its value is 1 and at any given moment, we can only move one step in one of the four directions. The valid moves are:

Up: (x, y) -> (x - 1, y)
Left: (x, y) -> (x, y - 1)
Down: (x, y) -> (x + 1, y)
Right: (x, y) -> (x, y + 1)

If there is no path from a given source cell to a destination cell, return -1.

For example :
consider the binary matrix below. If source = (0, 0) and destination = (3, 4), the shortest path from source to destination has length 11.

example

Problem approach

Start from the given source cell in the matrix and explore all four possible paths.
Check if the destination is reached or not.
Explore all the paths and backtrack if destination is not reached.
And also keep track of visited cells using an array.
Valid Moves are:

left: (i, j) ——> (i, j – 1)
right: (i, j) ——> (i, j + 1)
top: (i, j) ——> (i - 1, j)
bottom: (i, j) ——> (i + 1, j )

Try solving now

2. GCD Sum

Hard
35m average time
55% success
0/120
Asked in companies
AdobeDunzoQuikr

Consider all numbers from 1 to ‘N’, your task is to find the sum of gcd of all pairs (i, j) such that 1 <= i < j <= N.

For example for N = 3, all pairs are { (1, 2), (1, 3), (2, 3) }.

Note :

Gcd of two numbers (X, Y) is defined as the largest integer that divides both ‘X’ and ‘Y’. 
Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
SDE - 1
3 rounds | 5 problems
Interviewed by Pegasystems
1039 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Pegasystems
1224 views
0 comments
0 upvotes
SDE - 1
3 rounds | 6 problems
Interviewed by Pegasystems
705 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Pegasystems
1614 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes