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

SDE - 1

Cisco
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I was advised by my seniors to practice DSA from the very starting of B.Tech but I did not took that seriously. Honestly speaking, I regretted not taking their advice and in third year I started doing coding and I had to increase practice hours because I started late. But by the end of Third year, I was confident in both DSA and development but even then, I kept on revising the concepts.
Application story
This company visited my campus for placements. We just had to upload our resumes and fill in all the details in the form. First, they conducted the online assessment. Later, they called us for the interview rounds.
Why selected/rejected for the role?
The basic reason for my rejection was my not-so-strong knowledge of core DSA fundamentals, and my problem-solving ability is also not that good.
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, OOPS, Dynamic Programming
Tip
Tip

Tip 1 : Practice popular questions from Arrays, Binary Trees, LinkedLists from CodeStudio's Interview Problems
Tip 2 : Make sure you are aware of calculating the time and space complexity for every problem you're coding.
Tip 3 : Prepare through Mock Interviews to practice explaining your approach while solving in an actual interview.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1: Describe the best of your projects in minimum words. Don't forget to add buzzwords like REST APIs, DB Indexing, Benchmarking, etc., if you worked on the backend.

Tip 2: Don't add school achievements like Olympiads or being a class topper to your resume.

Tip 3: If you have some work experience, present it in a way that markets yourself. Use terms like "Created" or "Owned the project through the entire SDLC.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date11 Jan 2023
Coding problem2

1. Check N numbers

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

Given an array ‘arr’ of ‘N’ integers, make a number from those set of all integers from the ‘arr’ such that if number of ‘ith’ set bits are greater than the number of ‘ith’ unset bits then make that ‘ith’ bit of the new number as set bi otherwise make that ‘ith’ bit as unset bit.

For Example:

There are three numbers, say 8, 5 and 10. 
8 can be written as      1 0 0 0 .
5 can be written as      0 1 0 1.
10 can be written as     1 0 1 0. 
positions of the bits as i j k l.
So we can see majority bit at ith position are set bits so ith bit will be 1. Similarly for positions of j, k and l are set as 0 0 0 respectively.
So the number generated is 1 0 0 0 i.e. 8. 
Problem approach

Given a linked list, reverse alternate nodes and append them to the end of the list. Extra allowed space is O(1).

Try solving now

2. Next Greater Element

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

You are given an array 'a' of size 'n'.



The Next Greater Element for an element 'x' is the first element on the right side of 'x' in the array, which is greater than 'x'.


If no greater elements exist to the right of 'x', consider the next greater element as -1.


For example:
Input: 'a' = [7, 12, 1, 20]

Output: NGE = [12, 20, 20, -1]

Explanation: For the given array,

- The next greater element for 7 is 12.

- The next greater element for 12 is 20. 

- The next greater element for 1 is 20. 

- There is no greater element for 20 on the right side. So we consider NGE as -1.
Problem approach

Solved this question using stack and comparing current element of array to top of the stack.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date11 Jan 2023
Coding problem2

1. LRU Cache Implementation

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

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.

2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
You will be given ‘Q’ queries. Each query will belong to one of these two types:
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
Note :
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).

2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
Problem approach

Design and implement a data structure for a Least Recently Used (LRU) cache to support the following operations:

1. `get(key)` - Return the value of the key if the key exists in the cache; otherwise, return -1.
2. `put(key, value)` - Insert the value in the cache if the key is not already present, or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.

Try solving now

2. Reverse Words in a String

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

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

This was a standard question about strings and gave him an approach to initially reverse each word in the string and then reverse the whole string, and he was satisfied with that approach.

Try solving now
03
Round
Easy
Video Call
Duration60 minutes
Interview date11 Jan 2023
Coding problem2

1. Search In Rotated Sorted Array

Moderate
30m average time
65% success
0/80
Asked in companies
Tata 1mgWalmartDelhivery

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array consisting of distinct integers and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4, 5] and if he rotates it by 2, then the array becomes: [4, 5, 1, 2, 3].

After rotating a sorted array, Aahad needs to answer Q queries asked by Harshit, each of them is described by one integer Q[i]. which Harshit wanted him to search in the array. For each query, if he found it, he had to shout the index of the number, otherwise, he had to shout -1.

For each query, you have to complete the given method where 'key' denotes Q[i]. If the key exists in the array, return the index of the 'key', otherwise, return -1.

Note:

Can you solve each query in O(logN) ?
Problem approach

He extended the above question, and after a hint, I was able to come up with a binary search approach in which the end index would double up each time the binary search was called. He looked convinced.

Try solving now

2. K Most Frequent Elements

Moderate
10m average time
85% success
0/80
Asked in companies
OracleFacebookPaytm (One97 Communications Limited)

You are given an Integer array ‘ARR’ and an Integer ‘K’.


Your task is to find the ‘K’ most frequent elements in ‘ARR’. Return the elements in any order.


For Example:

You are given ‘ARR’ = {1, 2, 2, 3, 3} and ‘K’ = 2. 

The answer will {2, 3} as 2 and 3 are the elements occurring most times.
Problem approach

Given a book of words, assume you have enough main memory to accommodate all the words. Design a data structure to find the top K maximum occurring words. The data structure should be dynamic so that new words can be added.

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

Which SQL keyword removes duplicate records from a result set?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Cisco
1972 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Cisco
1138 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Cisco
626 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Cisco
692 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
107832 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
52130 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
32261 views
6 comments
0 upvotes