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

Technical Associate

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

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, OOPS Concept, DBMS, OS, SDLC
Tip
Tip

Tip 1 : Practice DP, Trees, and Graph
Tip 2 : Try to make only 1-page resume
Tip 3 : Make sure you have clarity over your projects.

Application process
Where: Linkedin
Resume Tip
Resume tip

Tip 1 : Make sure you have 2 good projects on your resume
Tip 2 : The resume should not be more than 1 page

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 minutes
Interview date6 Feb 2022
Coding problem2

This was an Online coding round with two coding questions and the time given was 90 minutes.

1. Distance Of Nearest Cell Having 1 In A Binary Matrix

Moderate
35m average time
65% success
0/80
Asked in companies
FacebookDunzoCIS - Cyber Infrastructure

You have been given a binary matrix 'MAT' containing only 0’s and 1’s of size N x M. You need to find the distance of the nearest cell having 1 in the matrix for each cell.

The distance is calculated as |i1 – i2| + |j1 – j2|, where i1, j1 are the coordinates of the current cell and i2, j2 are the coordinates of the nearest cell having value 1.
Note :
You can only move in four directions which are : Up, Down, Left and Right.
For example :
If N = 3, M = 4

and mat[ ][ ] = { 0, 0, 0, 1,
                  0, 0, 1, 1,
                  0, 1, 1, 0 }

then the output matrix will be

3  2  1  0
2  1  0  0
1  0  0  1
Problem approach

I solved this question in an online round using DP

1. Iterate over the matrix from top to bottom-left to right:
Update \text{dist}[i][j]=\min(\text{dist}[i][j],\min(\text{dist}[i][j-1],\text{dist}[i-1][j])+1)dist[i][j]=min(dist[i][j],min(dist[i][j−1],dist[i−1][j])+1) i.e., minimum of the current dist and distance from top or left neighbor +1, that would have been already calculated previously in the current iteration.

2. Now, we need to do the back iteration in the similar manner: from bottom to top-right to left:
Update \text{dist}[i][j]=\min(\text{dist}[i][j],\min(\text{dist}[i][j+1],\text{dist}[i+1][j])+1)dist[i][j]=min(dist[i][j],min(dist[i][j+1],dist[i+1][j])+1) i.e. minimum of current dist and distances calculated from bottom and right neighbors, that would be already available in current iteration.

Try solving now

2. Binary Tree Pruning

Moderate
20m average time
80% success
0/80
Asked in companies
DunzoArcesiumProtium

You have been given a Binary Tree where the value of each node is either 0 or 1. Your task is to return the same Binary Tree but all of its subtrees that don't contain a 1 have been removed.

Note :

A subtree of a node X is X, plus every node that is a descendant of X.

For Example :

Look at the below example to see a Binary Tree pruning.
Input: [1, 1, 1, 0, 1, 0, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]

alt text

Output: [1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1]

For example, the input for the tree depicted in the below image would be :

alt text

1
2 3
4 -1 5 6
-1 7 -1 -1 -1 -1
-1 -1

Explanation :

Level 1 :
The root node of the tree is 1

Level 2 :
Left child of 1 = 2
Right child of 1 = 3

Level 3 :
Left child of 2 = 4
Right child of 2 = null (-1)
Left child of 3 = 5
Right child of 3 = 6

Level 4 :
Left child of 4 = null (-1)
Right child of 4 = 7
Left child of 5 = null (-1)
Right child of 5 = null (-1)
Left child of 6 = null (-1)
Right child of 6 = null (-1)

Level 5 :
Left child of 7 = null (-1)
Right child of 7 = null (-1)

The first not-null node (of the previous level) is treated as the parent of the first two nodes of the current level. The second not-null node (of the previous level) is treated as the parent node for the next two nodes of the current level and so on.
The input ends when all nodes at the last level are null (-1).

Note :

The above format was just to provide clarity on how the input is formed for a given tree.

The sequence will be put together in a single line separated by a single space. Hence, for the above-depicted tree, the input will be given as:
1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1
Problem approach

I solved this question in an online round using Recursion and the approach I used is

We'll use a function containsOne(node) that tells us whether the subtree at this node contains a 1, and prunes all subtrees that do not contain 1.

If for example, node.left subtree does not contain a one, then we should prune it via node.left = null.

Also, the parent needs to be checked. If for example the tree is a single node 0, the answer is an empty tree.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date22 Feb 2022
Coding problem2

The round started with some Core subject questions and then an easy coding question. It went for around 60 minutes.

1. DBMS Questions

  • What do you understand by normalization and its types?
  • What are Primary keys and Foreign Keys.
Problem approach

Tip 1 : You must have your fundamentals clear and try to be on point.
Tip 2 : Be confident while answering any question.
 

2. Reverse Linked List

Moderate
15m average time
85% success
0/80
Asked in companies
WalmartHCL TechnologiesInfo Edge India (Naukri.com)

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Problem approach

So this is what I explained to my interviewer 

we are going to use 3 variables: prevNode, head and nextNode, that you can easily guess what are meant to represent as we go;
we will initialise prevNode to NULL, while nextNode can stay empty;
we are then going to loop until our current main iterator (head) is truthy (ie: not NULL), which would imply we reached the end of the list;
during the iteration, we first of all update nextNode so that it acquires its namesake value, the one of the next node indeed: head->next;
we then proceeding "reversing" head->next and assigning it the value of prevNode, while prevNode will become take the current value of head;
finally, we update head with the value we stored in nextNode and go on with the loop until we can. After the loop, we return prevNode.

and he was good with my answer.

Try solving now
03
Round
Easy
HR Round
Duration30 minutes
Interview date22 Feb 2022
Coding problem1

This was my final round i.e HR round and it was of 30 minutes. The interviewer asked me some standard HR questions which I prepared earlier so the interview went well.

1. Basic HR Questions

  • Tell me about yourself.
  • What are your weakness and strength?
  • Where do you see yourself in 5 year?
Problem approach

Tip 1 : Have a crisp solid intro about yourself including your skills, projects, and hobbies.
Tip 2 : I would ask you to go through all the standard questions and have your weakness and strength in mind.
Tip 3 : Try to give an answer in the domain you are applying and in the same organization.

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
Junior Associate: Marketing Strategy and Analysis
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
902 views
0 comments
0 upvotes
company logo
Associate Technology
3 rounds | 4 problems
Interviewed by CIS - Cyber Infrastructure
1057 views
0 comments
0 upvotes
company logo
Associate Software Engineer
2 rounds | 3 problems
Interviewed by CIS - Cyber Infrastructure
598 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by CIS - Cyber Infrastructure
580 views
1 comments
0 upvotes