CIS - Cyber Infrastructure interview experience Real time questions & tips from candidates to crack your interview

Associate Technology L2

CIS - Cyber Infrastructure
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I submitted my application for the Associate Technology L2 position at Publicis Sapient through LinkedIn and completed the interview stage. The selection process involved two technical rounds, where proficiency in technical aspects was assessed, followed by an HR round, which is a crucial step to secure a position within the company.
Application story
I applied on LinkedIn and got shortlisted for the first interview, which lasted for one hour. The next day, I received news that I had another round scheduled after a few days. I attended the second round and was shortlisted for the HR discussion, where I received the offer.
Why selected/rejected for the role?
I secured a spot on the shortlist due to my consistent preparation for the role, focusing on strengthening my fundamentals and core knowledge. Additionally, I dedicated time to practising basic coding questions, emphasizing the importance of a solid understanding of Java 8, particularly with a strong grasp of threading concepts.
Preparation
Duration: 3 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming, Java
Tip
Tip

Tip 1: Establish a solid foundation in theoretical concepts.
Tip 2: Familiarize yourself with straightforward and moderate-level problems.
Tip 3: Thoroughly review your resume to ensure a comprehensive understanding.

Application process
Where: Linkedin
Eligibility: B.Tech/ M.Tech
Resume Tip
Resume tip

Tip 1: Ensure the relevance of your resume by tailoring it to the specific job or opportunity.
Tip 2: Highlight your involvement in projects to showcase the practical application of your skills and experiences.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date15 Jan 2022
Coding problem2

During the initial round, the focus was on a challenging discussion about fundamental concepts. Additionally, a coding question was presented, and the session was extended for 60 minutes. Fortunately, my preparation, which included similar types of questions, allowed me to respond effectively, addressing both the theoretical and coding aspects within the given time frame.

1. Maximum Sum Rectangle

Easy
15m average time
85% success
0/40
Asked in companies
OptumGojekAdobe

You are given a matrix ‘ARR’ with ‘N’ rows and ‘M’ columns. Your task is to find the maximum sum rectangle in the matrix.

Maximum sum rectangle is a rectangle with the maximum value for the sum of integers present within its boundary, considering all the rectangles that can be formed from the elements of that matrix.

For Example
Consider following matrix:

The rectangle (1,1) to (3,3) is the rectangle with the maximum sum, i.e. 29.

Problem approach

public class MaximumSumRectangle {

// Function to find the maximum sum rectangle
public static int findMaximumSumRectangle(int[][] matrix) {
int rows = matrix.length;
int cols = matrix[0].length;

// Variables to store the final result
int maxSum = Integer.MIN_VALUE;
int finalLeft = 0, finalRight = 0, finalTop = 0, finalBottom = 0;

for (int left = 0; left < cols; left++) {
int[] temp = new int[rows];

for (int right = left; right < cols; right++) {
// Sum the values in the current column range for each row
for (int i = 0; i < rows; i++) {
temp[i] += matrix[i][right];
}

// Find the maximum sum subarray in temp[]
KadaneResult kadaneResult = kadane(temp);

// Update the maximum sum rectangle if needed
if (kadaneResult.maxSum > maxSum) {
maxSum = kadaneResult.maxSum;
finalLeft = left;
finalRight = right;
finalTop = kadaneResult.start;
finalBottom = kadaneResult.end;
}
}
}

// Print the maximum sum rectangle
System.out.println("Maximum Sum Rectangle:");
for (int i = finalTop; i <= finalBottom; i++) {
for (int j = finalLeft; j <= finalRight; j++) {
System.out.print(matrix[i][j] + " ");
}
System.out.println();
}

return maxSum;
}

// Function to find the maximum sum subarray in an array using Kadane's algorithm
private static KadaneResult kadane(int[] arr) {
int maxEndingHere = arr[0];
int maxSoFar = arr[0];
int start = 0;
int end = 0;
int tempStart = 0;

for (int i = 1; i < arr.length; i++) {
if (arr[i] > maxEndingHere + arr[i]) {
maxEndingHere = arr[i];
tempStart = i;
} else {
maxEndingHere += arr[i];
}

if (maxEndingHere > maxSoFar) {
maxSoFar = maxEndingHere;
start = tempStart;
end = i;
}
}

return new KadaneResult(maxSoFar, start, end);
}

// Helper class to store the result of Kadane's algorithm
private static class KadaneResult {
int maxSum;
int start;
int end;

KadaneResult(int maxSum, int start, int end) {
this.maxSum = maxSum;
this.start = start;
this.end = end;
}
}

public static void main(String[] args) {
int[][] matrix = {
{1, 2, -1, -4, -20},
{-8, -3, 4, 2, 1},
{3, 8, 10, 1, 3},
{-4, -1, 1, 7, -6}
};

int maxSum = findMaximumSumRectangle(matrix);
System.out.println("Maximum Sum: " + maxSum);
}
}

Try solving now

2. Minimum number of swaps required to sort an array

Easy
10m average time
90% success
0/40
Asked in companies
AmazonIBMHike

You have been given an array 'ARR' of 'N' distinct elements.

Your task is to find the minimum no. of swaps required to sort the array.

For example:
For the given input array [4, 3, 2, 1], the minimum no. of swaps required to sort the array is 2, i.e. swap index 0 with 3 and 1 with 2 to form the sorted array [1, 2, 3, 4].
Problem approach

While iterating over the array, check the current element, and if not in the correct place, replace that element with the index of the element that should have come to this place greedily which will give the optimal answer

Follow the below steps to solve the problem:

1) Create a new array and copy the elements of the input array
2) Sort the new array and declare a variable ans equal to 0
3) Run a for loop to traverse the elements
4) If the current element in the sorted array is not equal to the one in the input array then increase the ans by 1
And swap the current element, with the required element at this index
Return ans

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date18 Jan 2022
Coding problem3

The second round lasted for 60 minutes, during which the interviewer asked 2 coding problems and a few theory questions.

1. OS Questions

What is Banker’s algorithm? (Learn)

Problem approach

The banker’s algorithm is a resource allocation and deadlock avoidance algorithm that tests for safety by simulating the allocation for the predetermined maximum possible amounts of all resources, then makes an “s-state” check to test for possible activities, before deciding whether allocation should be allowed to continue.

2. Find Duplicates In Array

Easy
15m average time
90% success
0/40
Asked in companies
OYOIBMAcko

You are given an array/list 'ARR' consisting of N integers, which contains elements only in the range 0 to N - 1. Some of the elements may be repeated in 'ARR'. Your task is to find all such duplicate elements.

Note:
1. All the elements are in the range 0 to N - 1.
2. The elements may not be in sorted order.
3. You can return the duplicate elements in any order.
4. If there are no duplicates present then return an empty array.
Problem approach

Follow the steps to implement the approach:

Iterate Through the Array
Calculate an index based on the absolute value of each element.
If the index is equal to ‘n,‘ count it as the largest element.
If the element at the calculated index is negative, add (index – 1) to the result vector and modify the element at that index.
If there are more than one largest element, add ‘n – 1’ to the result vector.
If the result vector is empty, add ‘-1‘ to it.
Otherwise, sort the result vector.
Return the Result Vector

Try solving now

3. Balanced parentheses

Moderate
10m average time
90% success
0/80
Asked in companies
SalesforceAmazonMicrosoft

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.

Note :

Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.

2. Open brackets must be closed in the correct order.

For Example :

()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Problem approach

The idea is to put all the opening brackets in the stack. Whenever you hit a closing bracket, search if the top of the stack is the opening bracket of the same nature. If this holds then pop the stack and continue the iteration. In the end, if the stack is empty, it means all brackets are balanced or well-formed. Otherwise, they are not balanced.

Try solving now
03
Round
Easy
HR Round
Duration60 minutes
Interview date23 Jan 2022
Coding problem1

1. Basic HR Questions

What do you know about Publicis Sapient?
Why do you want to work at Publicis Sapient?
How do you stay updated on industry trends and technologies?
What is your approach to working in a team?

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by CIS - Cyber Infrastructure
784 views
0 comments
0 upvotes
company logo
ATL2
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
0 views
0 comments
0 upvotes
company logo
Trainee Engineer
2 rounds | 3 problems
Interviewed by CIS - Cyber Infrastructure
605 views
0 comments
0 upvotes
company logo
Trainee Engineer
3 rounds | 6 problems
Interviewed by CIS - Cyber Infrastructure
1005 views
0 comments
0 upvotes