
Cisco


40+ Cisco Software Engineer Interview Questions and Answers
Q1. Find Row With Maximum 1's in a Sorted 2D Matrix
You are provided with a 2D matrix containing only the integers 0 or 1. The matrix has dimensions N x M, and each row is sorted in non-decreasing order. Your objec...read more
Find the row with the maximum number of 1's in a sorted 2D matrix.
Iterate through each row of the matrix and count the number of 1's in each row.
Keep track of the row index with the maximum number of 1's seen so far.
Return the index of the row with the maximum number of 1's.
If multiple rows have the same number of 1's, return the row with the smallest index.
Q2. Intersection of Linked List Problem
You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.
Your task is to determine the data...read more
Find the node where two linked lists merge, return -1 if no merging occurs.
Traverse both lists to find the lengths and the last nodes
Align the starting points of the lists by adjusting the pointers
Traverse both lists simultaneously until a common node is found
Q3. Next Greater Element Problem Statement
You are given an array arr
of length N
. For each element in the array, find the next greater element (NGE) that appears to the right. If there is no such greater element, ...read more
The task is to find the next greater element for each element in an array to its right, if no greater element exists, return -1.
Use a stack to keep track of elements for which the next greater element is not found yet.
Iterate through the array from right to left and update the stack accordingly.
Pop elements from the stack until a greater element is found or the stack is empty.
Q4. Rat in a Maze Problem Statement
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N matrix w...read more
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Recursively try moving in all directions (up, down, left, right) until reaching the destination.
Return a list of strings representing valid paths sorted in alphabetical order.
Q5. Interleaving Two Strings Problem Statement
You are given three strings 'A', 'B', and 'C'. Determine if 'C' is formed by interleaving 'A' and 'B'.
String 'C' is an interleaving of 'A' and 'B' if the length of 'C...read more
The problem involves determining if a string is formed by interleaving two other strings while maintaining their order.
Check if the length of string C is equal to the sum of the lengths of strings A and B.
Iterate through string C and check if all characters of A and B exist in C in the correct order.
If at any point a character in C does not match the corresponding character in A or B, return False.
Return True if all characters of A and B are found in C in the correct order.
Q6. Pattern Matching Problem Statement
Given a pattern as a string and a set of words, determine if the pattern and the words list align in the same sequence.
Input:
T (number of test cases)
For each test case:
patte...read more
The problem involves determining if a given pattern aligns with a list of words in the same sequence.
Iterate through the pattern and words list simultaneously to check for alignment
Use a hashmap to store the mapping between characters in the pattern and words in the list
Compare the mappings to determine if the sequence matches
Return 'True' if the sequence matches, otherwise return 'False'
Q7. How many clients are possible for a /24 address?. What is the network address and broadcast address here?
A /24 address can have 256 clients. Network address is the first IP and broadcast address is the last IP.
A /24 address has 256 IP addresses
The network address is the first IP in the range
The broadcast address is the last IP in the range
Q8. When would I go for a router to make two computers communicate?
A router is needed to connect two computers in different networks or to share internet connection.
When two computers are in different networks, a router is needed to connect them.
A router can also be used to share internet connection between multiple devices.
Routers can provide additional security features like firewall and VPN.
Examples of routers include Cisco, Netgear, and TP-Link.
Q9. What is the difference between an arraylist and a linkedlist in Java?
ArrayList is a resizable array while LinkedList is a doubly linked list.
ArrayList is faster for accessing elements while LinkedList is faster for adding or removing elements.
ArrayList uses contiguous memory while LinkedList uses non-contiguous memory.
ArrayList is better for random access while LinkedList is better for sequential access.
Example: ArrayList - List
names = new ArrayList<>(); LinkedList - List names = new LinkedList<>();
Q10. What are possible security issues and How to manage Security concerns in web application
Possible security issues and how to manage them in web applications
SQL injection attacks
Cross-site scripting (XSS) attacks
Cross-site request forgery (CSRF) attacks
Insecure authentication and authorization mechanisms
Sensitive data exposure
Implementing secure coding practices
Regularly updating software and security patches
Conducting regular security audits and penetration testing
Implementing multi-factor authentication
Using HTTPS and SSL/TLS encryption
Limiting access to sensiti...read more
Q11. What is the difference between an object oriented and object based language?
Object-oriented languages support inheritance and polymorphism, while object-based languages do not.
Object-oriented languages allow for the creation of classes and objects, and support inheritance and polymorphism.
Object-based languages only support objects, but do not have the concept of classes or inheritance.
Examples of object-oriented languages include Java, C++, and Python, while JavaScript is an example of an object-based language.
Q12. Explain what happens underneath when you enter a URL in the browser
Entering a URL in the browser triggers a series of events to retrieve and display the requested webpage.
The browser checks the cache for a previously stored copy of the webpage
If not found, the browser sends a request to the DNS server to resolve the domain name to an IP address
The browser then sends a request to the web server at the IP address for the webpage
The web server responds with the requested webpage
The browser renders the webpage and displays it to the user
Q13. What is virtual memory? What is its size in relation to main memory?
Virtual memory is a memory management technique that allows a computer to use more memory than physically available.
Virtual memory is created by using hard disk space as an extension of RAM.
It allows running more programs than the physical memory can handle.
The size of virtual memory is typically larger than the size of main memory.
Virtual memory is divided into pages, which are swapped in and out of main memory as needed.
Examples of virtual memory include Windows pagefile an...read more
Q14. What is the difference between anycast, unicast, and multicast?
Anycast, unicast, and multicast are different ways of routing network traffic.
Unicast is one-to-one communication between a sender and a receiver.
Anycast is one-to-nearest communication where the sender sends a message to the nearest receiver.
Multicast is one-to-many communication where the sender sends a message to a group of receivers.
Anycast is used for load balancing and finding the nearest server.
Unicast is used for regular client-server communication.
Multicast is used f...read more
Q15. JS Interview: How async works in javascript given that it is single threaded?
Async in JS allows non-blocking code execution despite being single-threaded.
JS uses event loop to handle async operations
Callbacks, Promises, and Async/Await are used for async programming
setTimeout() and setInterval() are examples of async functions
JS runtime delegates async tasks to the browser or Node.js environment
Async code can improve performance and user experience
Q16. Explain why MAC addresses are required despite having IP addresses
MAC addresses are required for identifying devices on a local network, while IP addresses are used for identifying devices on a global network.
MAC addresses are used for communication within a local network
IP addresses are used for communication across different networks
MAC addresses are assigned by the manufacturer and cannot be changed
IP addresses can be assigned dynamically or statically
MAC addresses are used in the data link layer of the OSI model
IP addresses are used in ...read more
Q17. Program to print the elements of a binary tree in spiral order
Program to print binary tree elements in spiral order
Use two stacks to keep track of nodes at odd and even levels
Push nodes from left to right in odd level stack and right to left in even level stack
Pop nodes from the stack alternatively and print them
Repeat until both stacks are empty
Q18. Mention the number of bits in IPv4 and IPv6 addresses
IPv4 has 32 bits and IPv6 has 128 bits.
IPv4 addresses are in the format of xxx.xxx.xxx.xxx where each xxx is an 8-bit number.
IPv6 addresses are in the format of xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx where each xxxx is a 16-bit number.
IPv6 addresses allow for a much larger number of unique addresses than IPv4.
Q19. Explain inheritance and abstraction with a concrete example
Inheritance is a way to create new classes based on existing ones. Abstraction is a way to hide implementation details.
Inheritance allows a subclass to inherit properties and methods from a superclass.
Abstraction allows a class to provide a simplified interface to its users while hiding its implementation details.
For example, a Car class can inherit properties and methods from a Vehicle class, while also implementing its own unique features.
Abstraction can be seen in a TV rem...read more
Q20. JS interview: What is event bubble and capture?
Event bubble and capture are two ways of propagating events in the DOM tree.
Event bubble is the default behavior where an event is first captured by the innermost element and then propagated to the outer elements.
Event capture is the opposite of event bubble where an event is first captured by the outermost element and then propagated to the inner elements.
Both event bubble and capture can be used together to handle events in a more controlled way.
Event.stopPropagation() meth...read more
Q21. How TCP works? How does it handle cognition?
TCP is a protocol that ensures reliable communication by establishing a connection, managing data transfer, and handling errors.
TCP establishes a connection between two devices before data transfer begins.
It breaks data into packets and numbers them for sequencing.
It uses acknowledgments and retransmissions to ensure all packets are received.
TCP handles flow control by adjusting the transmission rate based on receiver's capacity.
It also handles congestion control by detecting...read more
Q22. How do you implement a queue using as stacks
Implement a queue using two stacks by using one stack for enqueue operation and another stack for dequeue operation.
Use one stack for enqueue operation by pushing elements onto it.
Use another stack for dequeue operation by popping elements from it. If the dequeue stack is empty, transfer all elements from the enqueue stack to the dequeue stack.
Maintain the order of elements by transferring elements between the two stacks as needed.
Q23. What is the need for IPv6?
IPv6 is needed due to the exhaustion of IPv4 addresses and the need for more unique IP addresses.
IPv6 provides a significantly larger address space compared to IPv4.
It allows for the allocation of unique IP addresses to every device connected to the internet.
IPv6 supports improved security features and better network performance.
It enables the growth of Internet of Things (IoT) devices and services.
Transitioning to IPv6 ensures the long-term sustainability of the internet.
Q24. What is an arraylist in Java?
An ArrayList is a dynamic array in Java that can grow or shrink in size during runtime.
ArrayList is a class in Java's Collection framework.
It implements the List interface and allows duplicate elements.
Elements can be added or removed using methods like add(), remove(), etc.
It can also be sorted using the sort() method.
Example: ArrayList
names = new ArrayList<>(); names.add("John"); names.add("Mary"); names.remove(0);
Q25. Generate a spiral for given matrix in clockwise direction
Generate a spiral order traversal of a given matrix in clockwise direction
Initialize variables for top, bottom, left, right boundaries
Iterate through the matrix in a spiral order while adjusting boundaries
Add elements to the result array in the spiral order
Q26. what is your plan for honeymoontrip?
I am not comfortable discussing my personal life in a professional interview.
I prefer to keep my personal life separate from my professional life.
I believe in maintaining a work-life balance.
I am fully committed to my work and will prioritize it over personal matters.
I appreciate the question, but I would rather not discuss my honeymoon plans.
Q27. Mention the layers in OSI stack
OSI stack has 7 layers that define how data is transmitted over a network.
OSI stands for Open Systems Interconnection
Each layer has a specific function and communicates with adjacent layers
Layers are: Physical, Data Link, Network, Transport, Session, Presentation, Application
Q28. Write the code to reverse linked list using recursion
Code to reverse linked list using recursion
Create a recursive function to traverse the linked list
Swap the next and previous nodes in each recursive call
Return the new head of the reversed linked list
Q29. Find the next greater element using stack
Using stack to find the next greater element in an array
Create an empty stack to store indices of elements
Iterate through the array from right to left
Pop elements from stack until a greater element is found or stack is empty
Q30. System Design - Design a multi user job scheduler
A multi user job scheduler allows multiple users to schedule and manage their tasks efficiently.
Implement a centralized job scheduling system that can handle multiple users and their tasks simultaneously
Include features such as task prioritization, deadline management, and resource allocation
Use a database to store user information, task details, and scheduling algorithms
Provide a user-friendly interface for users to create, edit, and monitor their scheduled tasks
Q31. Find the maximum element inside singly linkedlist
Find the maximum element in a singly linked list.
Traverse the list and keep track of the maximum element seen so far.
Compare each element with the current maximum and update if necessary.
Return the maximum element at the end of the traversal.
Q32. What is the point of BST?
BST is a data structure used for efficient searching, insertion and deletion of elements in a sorted manner.
BST stands for Binary Search Tree.
It has a root node and every node has at most two children.
The left subtree of a node contains only nodes with keys lesser than the node's key.
The right subtree of a node contains only nodes with keys greater than the node's key.
BST allows for efficient searching, insertion and deletion of elements in O(log n) time complexity.
Example: S...read more
Q33. Performance improvements in Angular
Performance improvements in Angular can be achieved through lazy loading, AOT compilation, and optimizing change detection.
Lazy loading: load modules only when needed
AOT compilation: pre-compile templates for faster rendering
Optimizing change detection: use OnPush strategy, avoid unnecessary bindings
Use trackBy function for ngFor loops
Use pure pipes instead of impure pipes
Use ngZone.runOutsideAngular() for heavy computations
Use Web Workers for parallel processing
Minimize HTTP...read more
Q34. How was your test ?
The test went well, I was able to complete all the tasks within the given time frame.
I prepared well for the test by reviewing relevant materials
I managed my time effectively during the test
I was able to solve all the problems and complete all the tasks
I double-checked my work to ensure accuracy
Q35. Any knowledge of Networks/DS?
Yes
Knowledge of network protocols and architectures
Understanding of data structures and algorithms
Experience with network troubleshooting and analysis
Familiarity with network security and encryption
Proficiency in network programming and socket programming
Q36. What is a microservice?
A microservice is a small, independent, and loosely coupled service that performs a specific business function.
Microservices are designed to be small and focused on a single task or business function.
They communicate with each other through APIs.
Each microservice can be developed, deployed, and scaled independently.
Examples include user authentication service, payment processing service, and notification service.
Q37. HTTP header format ?
HTTP headers are key-value pairs sent between the client and server to provide additional information about the request or response.
HTTP headers consist of a key-value pair separated by a colon, with each pair separated by a new line
Headers are used to provide information such as content type, content length, caching directives, authentication credentials, etc.
Example: 'Content-Type: application/json'
Q38. what is call apply bind
call, apply, and bind are methods in JavaScript used to manipulate the context of a function.
call - calls a function with a given 'this' value and arguments provided individually.
apply - calls a function with a given 'this' value and arguments provided as an array.
bind - creates a new function that, when called, has its 'this' keyword set to the provided value.
Q39. Sorting an array and merging
Sorting an array of strings and merging them into a single string
Use a sorting algorithm like quicksort or mergesort to sort the array of strings
After sorting, merge the sorted strings into a single string using a loop or built-in functions like join()
Q40. meta classes in python
Meta classes are classes that define the behavior of other classes.
Meta classes are used to customize the behavior of classes.
They can be used to add or modify attributes and methods of classes.
They can also be used to enforce certain rules or restrictions on classes.
In Python, the default meta class is 'type'.
Example: class MyMeta(type): pass
Q41. Reverse a linked list
Reverse a linked list
Iteratively swap the next and previous pointers of each node
Use three pointers to keep track of the current, previous, and next nodes
Update the head pointer to the last node after reversing
Q42. what is currying
Currying is a technique in functional programming where a function with multiple arguments is transformed into a sequence of functions, each taking a single argument.
Currying helps in creating reusable functions and improving code readability.
It allows partial application of functions, where some arguments are fixed and others are left to be provided later.
Example: const add = a => b => a + b; add(2)(3) will return 5.
Q43. Router & switch functionality
Routers connect different networks, while switches connect devices within a network.
Routers operate at the network layer and make decisions based on IP addresses
Switches operate at the data link layer and use MAC addresses to forward data
Routers can connect multiple networks together, while switches connect devices within the same network
Example: A router connects a home network to the internet, while a switch connects devices within the home network
Q44. Design a rate limiter
Rate limiter design to control the rate of requests to a system
Implement a token bucket algorithm to limit the number of requests per unit of time
Use a sliding window algorithm to track and limit the number of requests within a specific time frame
Consider using a distributed rate limiter for scalability and reliability
Q45. Sorting of array
Sorting an array of strings in alphabetical order
Use a sorting algorithm like quicksort or mergesort
Ensure the sorting is case-insensitive if needed
Consider using built-in sorting functions in programming languages like sort() in Python
Q46. Largest subsequence
Find the largest subsequence in an array of strings
Iterate through the array of strings and compare the length of each subsequence
Keep track of the longest subsequence found so far
Return the longest subsequence
Top HR Questions asked in Cisco Software Engineer
Interview Process at Cisco Software Engineer

Top Software Engineer Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

