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

SDE - 1

Cisco
upvote
share-icon
3 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
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 and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: Above 7 CGPA
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
Medium
Online Coding Interview
Duration60 Minutes
Interview date28 Oct 2020
Coding problem1

This was an Online Coding+MCQ round where we had a total of 50 MCQ questions and 1 coding problem. The coding problem was of easy to medium level.

1. Add Two Numbers As Linked Lists

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

You are given two non-negative numbers 'num1' and 'num2' represented in the form of linked lists.


The digits in the linked lists are stored in reverse order, i.e. starting from least significant digit (LSD) to the most significant digit (MSD), and each of their nodes contains a single digit.


Calculate the sum of the two numbers and return the head of the sum list.


Example :
Input:
'num1' : 1 -> 2 -> 3 -> NULL
'num2' : 4 -> 5 -> 6 -> NULL

Output: 5 -> 7 -> 9 -> NULL

Explanation: 'num1' represents the number 321 and 'num2' represents 654. Their sum is 975.


Problem approach

Approach : 
1) We will reverse both linked lists so that we can easily process the number in this manner.
2) Now, we will start adding the nodes of both linked lists and use another variable ‘carry’ to keep track of the carry generated in each addition. 
3) We will be updating either of the linked lists to their sum. Hence, we will not be using any extra space for storing the result.
4) In the end, if we are left with a ‘carry’ greater than 0, we will just add a new node in our resultant linked list.

TC : O(N+M), where ‘N’ and ‘M’ are the numbers of nodes in both linked lists. 
SC : O(1)

Try solving now
02
Round
Medium
Video Call
Duration60 Minutes
Interview date29 Oct 2020
Coding problem5

This round had 1 question related to Binary Tree Traversal and then the rest of the questions that the interviewer asked me were mostly related to OOPS and C++.

1. Level Order Traversal

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

You have been given a Binary Tree of integers. You are supposed to return the level order traversal of the given tree.

For example:
For the given binary tree

Example

The level order traversal will be {1,2,3,4,5,6,7}.
Problem approach

Approach :
For each node, first the node is visited and then it’s child nodes are put in a queue. 
Steps :
printLevelorder(tree)
1) Create an empty queue q
2) temp_node = root 
3) Loop while temp_node is not NULL
a) print temp_node->data.
b) Enqueue temp_node’s children 
(first left then right children) to q
c) Dequeue a node from q.

TC : O(N) , where N is the number of nodes in the binary tree 
SC : O(N)

Try solving now

2. C++ Question

What is namespace in C++?

Problem approach

If there are two or more functions with the same name defined in different libraries then how will the compiler know which one to refer to? Thus namespace came to picture. A namespace defines a scope and differentiates functions, classes, variables etc. with the same name available in different libraries. The namespace starts with the keyword “namespace”. The syntax for the same is as follows:

namespace namespace_name {
// code declarations
}

3. C++ Question

Define storage class in C++. Name some.

Problem approach

Storage class in C++ specifically resemble life or even the scope of symbols, including the variables, functions, etc. Some of the storage class names in C++ include mutable, auto, static, extern, register, etc.

4. OOPS Question

Why do we need the Friend class and function?

Problem approach

Sometimes, there is a need for allowing a particular class to access private or protected members of a class. The solution is a friend class, which can access the protected and private members of the class in which it is declared as a friend.

Similar to the friend class, a friend function is able to access private and protected class members. A friend function can either be a global function or a method of some class.

Some important points about friend class and friend function:

1) Friendship is not inherited.

2) Friendship isn’t mutual, i.e., if some class called Friend is a friend of some other class called NotAFriend, then it doesn’t automatically become a friend of the Friend class.

3) The total number of friend classes and friend functions should be limited in a program as the overabundance of the same might lead to a depreciation of the concept of encapsulation of separate classes, which is an inherent and desirable quality of object-oriented programming.

5. OOPS Question

What does a Static member in C++ mean?

Problem approach

Denoted by the static keyword, a static member is allocated storage, in the static storage area, only once during the program lifetime. Some important facts pertaining to the static members are:

i) Any static member function can’t be virtual.
ii) Static member functions don’t have ‘this’ pointer.
iii) The const, const volatile, and volatile declaration aren’t available for static member functions

03
Round
Medium
Video Call
Duration60 minutes
Interview date29 Oct 2020
Coding problem4

This round was more aligned towards Computer Networks and had 1 question of DSA realted to Binary Trees and the interview ended with the famous Die-Hard Puzzle.

1. Spiral Order Traversal of a Binary Tree

Easy
20m average time
75% success
0/40
Asked in companies
MicrosoftCiscoArcesium

You have been given a binary tree of 'N' nodes. Print the Spiral Order traversal of this binary tree.

For example
For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
    1
   / \
  2   3
     / \
    4   5

Output: 1 3 2 4 5
Problem approach

Approach :
1) We will maintain two stacks, one for each direction i.e. leftToRight and rightToleft.
2) We will do a level order traversal of the given binary tree and push nodes of each level onto one of the stack according to the current direction of traversal.
3) After we’ve pushed all nodes of a level onto one stack, we’ll start popping those nodes. While popping the nodes we will push their children (if any) onto our other direction stack, so that the next level be traversed in reverse order.

TC : O(N), where ‘N’ is the number of nodes in the binary tree.
SC : O(N)

Try solving now

2. Networking Question

Describe the OSI Reference Model

Problem approach

Open System Interconnections (OSI) is a network architecture model based on the ISO standards. It is called the OSI model as it deals with connecting the systems that are open for communication with other systems.

The OSI model has seven layers. The principles used to arrive at the seven layers can be summarized briefly as below:

1) Create a new layer if a different abstraction is needed.
2) Each layer should have a well-defined function.
3) The function of each layer is chosen based on internationally standardized protocols.

3. Networking Question

What is the use of a router and how is it different from a gateway?

Problem approach

The router is a networking device used for connecting two or more network segments. It directs the traffic in the network. It transfers information and data like web pages, emails, images, videos, etc. from source to destination in the form of packets. It operates at the network layer. The gateways are also used to route and regulate the network traffic but, they can also send data between two dissimilar networks while a router can only send data to similar networks.

4. Puzzle

Measure 4L using 3L and 5L cans .

Problem approach

Steps :
Let's call 5L jar as X and 3L jar as Y.
1) We'll take the first jar, i.e, X. Fill X completely.
2) Then empty the X content in Y. We are left with 2 L in the X.
3) Now we will empty the Y jar and then Fill 2L from X into Y. We are left with 0L in X and 2L in Y.
4) Now again we will fill X with 5L and then empty till Y gets full.
5) As Y is already full with 2L from previous operation so it can only accomodate 1L now from X. So when
Y jar is full automatically we will have 4L left in X. This is how we will calculate 4L

Here's your problem of the day

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

Skill covered: Programming

To make an AI less repetitive in a long paragraph, you should increase:

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Cisco
2368 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Cisco
1556 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Cisco
834 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Cisco
968 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114453 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57719 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34914 views
7 comments
0 upvotes