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

Associate Professional

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

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, Algorithms, Java 8, Sql, Spring Boot
Tip
Tip

Tip 1 : Prepare fundamental theory well
Tip 2 : Prepare Easy and medium level questions
Tip 3 : Go through you resume well

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

Tip 1: Make your resume relevant
Tip 2: Mention projects

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date19 Jan 2022
Coding problem4

First round was on tricky fundamental discussion and 1 coding question which went for 60 minutes where I was able to answer the questions as I was preparing similar kind of questions.

1. Reverse Words in a String

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

You are given a string 'str' of length 'N'.


Your task is to reverse the original string word by word.


There can be multiple spaces between two words and there can be leading or trailing spaces but in the output reversed string you need to put a single space between two words, and your reversed string should not contain leading or trailing spaces.


Example :
If the given input string is "Welcome to Coding Ninjas", then you should return "Ninjas Coding to Welcome" as the reversed string has only a single space between two words and there is no leading or trailing space.
Problem approach

StringBuilder res = new StringBuilder();
int currentIndex = 0;
for (int i = 0; i < s.length(); i++) {
if(s.charAt(i) == ' ') continue;
int start = i;
while(i < s.length() && s.charAt(i) != ' ') i++;
res.insert(0, s.substring(start, i)).insert(0, " ");
}
return res.toString().trim();

Try solving now

2. DS based question

Internal Working of hashmaps

3. Design Pattern based questions

Singleton design patter and immutable class implementation

4. OOPs based question

Interface and abstract classes

02
Round
Medium
Video Call
Duration60 mins
Interview date21 Jan 2022
Coding problem4

The second round went for 60 minutes in which Interviewer asked 2 coding problems and few theory questions

1. Stack using queue

Moderate
25m average time
65% success
0/80
Asked in companies
AmazonQualcommPhilips

Implement a Stack Data Structure specifically to store integer data using two Queues.


There should be two data members, both being Queues to store the data internally. You may use the inbuilt Queue.


Implement the following public functions :

1. Constructor:
It initializes the data members(queues) as required.

2. push(data) :
This function should take one argument of type integer. It pushes the element into the stack and returns nothing.

3. pop() :
It pops the element from the top of the stack and, in turn, returns the element being popped or deleted. In case the stack is empty, it returns -1.

4. top :
It returns the element being kept at the top of the stack. In case the stack is empty, it returns -1.

5. size() :
It returns the size of the stack at any given instance of time.

6. isEmpty() :
It returns a boolean value indicating whether the stack is empty or not.
Operations Performed on the Stack:
Query-1(Denoted by an integer 1): Pushes an integer data to the stack. (push function)

Query-2(Denoted by an integer 2): Pops the data kept at the top of the stack and returns it to the caller. (pop function)

Query-3(Denoted by an integer 3): Fetches and returns the data being kept at the top of the stack but doesn't remove it, unlike the pop function. (top function)

Query-4(Denoted by an integer 4): Returns the current size of the stack. (size function)

Query-5(Denoted by an integer 5): Returns a boolean value denoting whether the stack is empty or not. (isEmpty function)
Example
Operations: 
1 5
1 10
2
3
4

Enqueue operation 1 5: We insert 5 at the back of the queue.
  Queue: [5]

Enqueue operation 1 10: We insert 10 at the back of the queue.
  Queue: [5, 10]

Dequeue operation 2: We remove the element from the front of the queue, which is 5, and print it.
  Output: 5
  Queue: [10]

Peek operation 3: We return the element present at the front of the queue, which is 10, without removing it.
  Output: 10
  Queue: [10]

IsEmpty operation 4: We check if the queue is empty.
  Output: False
  Queue: [10]
Problem approach

class QueueStack{

constructor(){

this.q1 = new Queue(); 

this.q2 = new Queue(); 

}

push(x){

if(this.q1.arr.length==0){this.q1.push(x)}

else{

this.q2.push(x)

while(this.q1.arr.length>this.q1.front){

this.q2.push(this.q1.pop())

}

this.q1=this.q2

this.q2=new Queue

}



}

pop(){

return this.q1.pop() 

}

}

Try solving now

2. DBMS Question

Difference b/w primary key and unique key

3. OOPS Questions

Find average of integer array using stream class

Compile time and runtime polymorphism impl

4. OOPS questions

What is default and static methods in interface

03
Round
Easy
HR Round
Duration20 mins
Interview date24 Jan 2022
Coding problem1

1. Puzzle

Find the fastest 3 horses
There are 25 horses among which you need to find out the fastest 3 horses. You can conduct a race among at most 5 to find out their relative speed. At no point, you can find out the actual speed of the horse in a race. Find out the minimum no. of races that are required to get the top 3 horses.

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
Associate Professional
4 rounds | 6 problems
Interviewed by CIS - Cyber Infrastructure
0 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
Associate Professional
3 rounds | 3 problems
Interviewed by CIS - Cyber Infrastructure
529 views
0 comments
0 upvotes
company logo
Trainee Engineer
3 rounds | 6 problems
Interviewed by CIS - Cyber Infrastructure
1006 views
0 comments
0 upvotes