Polycom
10+ Asian Paints Interview Questions and Answers
Q1. You are given an array of 0s, 1s and 2s, you have to sort it. (calculating the number of 0s,1s and 2s is not counted as the solution for this problem)
Sort an array of 0s, 1s, and 2s without counting their occurrences.
Use three pointers to keep track of the last index of 0s, 1s, and 2s.
Iterate through the array and swap elements to their respective pointers.
Time complexity: O(n), Space complexity: O(1).
Q2. Can you measure congestion in the system using Ping and how?
Yes, Ping can be used to measure congestion in the system.
Ping measures the round-trip time for packets to travel from the source to the destination.
If the round-trip time is high, it indicates congestion in the network.
Ping can also be used to measure packet loss, which is another indicator of congestion.
Q3. Create a structure for link list and insert two nodes in it(write the code). (Since i know STL as well, first i coded it in C and then used STL as well)
Create and insert nodes in a linked list using C and STL.
Define a struct for the linked list node
Allocate memory for the nodes using malloc or new
Set the data and next pointer for each node
Use push_back or insert functions in STL for insertion
Q4. What is Denial of Service attack and what is its remedy?
A Denial of Service (DoS) attack is an attempt to make a website or network unavailable to users by overwhelming it with traffic.
DoS attack floods a network or server with traffic to make it unavailable to users
Remedy includes implementing firewalls, load balancers, and intrusion detection systems
Another remedy is to use a content delivery network (CDN) to distribute traffic
Examples of DoS attacks include Ping of Death, SYN Flood, and Smurf Attack
Q5. How can you calculate the round trip time and bandwidth of the network using Pin
Calculating round trip time and bandwidth of network using Pin
Use Pin to measure the time it takes for a packet to travel from source to destination and back
Divide the round trip time by 2 to get the one-way latency
Calculate bandwidth by dividing the size of the packet by the one-way latency
Repeat the process with different packet sizes to get an average bandwidth
Use Pin's built-in tools to analyze the data and generate reports
Q6. You are given a pointer to a node in the link list(starting pointer is not given) and you have to delete that node
Deleting a node in a linked list given a pointer to the node.
Save the next node's pointer in a temp variable
Copy the data of the next node to the current node
Delete the next node using the temp variable
Q7. How does a router uses longest prefix matching to route a packet
A router uses longest prefix matching to find the most specific route for a packet.
The router looks at the destination IP address of the packet
It compares the address with the entries in its routing table
The router selects the entry with the longest matching prefix
The packet is then forwarded to the next hop in that route
If there is no matching prefix, the router uses the default route
Longest prefix matching ensures efficient routing and reduces the size of the routing table
Q8. How Minimum Spanning Tree is useful in Networking Domain
Minimum Spanning Tree helps in finding the shortest path in a network.
MST helps in reducing the cost of network connections.
It is used in network design and optimization.
MST algorithms like Kruskal's and Prim's are used in network routing protocols.
MST can be used to find the shortest path between two nodes in a network.
Example: MST can be used to find the shortest path for data transmission in a computer network.
Q9. Define Articulation Points and what is its significance in networking
Articulation points are nodes in a network whose removal would disconnect the network or increase the number of connected components.
Articulation points are also known as cut vertices.
They are significant in network design and analysis as they help identify critical points in the network.
Removing an articulation point can cause the network to split into multiple disconnected components.
For example, in a computer network, an articulation point could be a router that connects m...read more
Q10. What is Distributed Denial of Service attack?
DDoS is a cyber attack where multiple systems flood a targeted server with traffic to make it unavailable.
DDoS attack overwhelms a server with traffic from multiple sources
Attackers use botnets to launch DDoS attacks
DDoS attacks can be mitigated by using specialized software and hardware
Examples of DDoS attacks include the 2016 Dyn cyberattack and the 2018 GitHub attack
Q11. Clearly explain the TCP/IP protocol stack alongwith the functioning of each layer
TCP/IP protocol stack consists of 4 layers: Application, Transport, Internet, and Network Access.
Application layer: interacts with user applications and provides services like email, file transfer, etc.
Transport layer: responsible for end-to-end communication between hosts and provides reliable data transfer using TCP or unreliable using UDP.
Internet layer: responsible for routing packets across networks using IP addresses.
Network Access layer: responsible for transmitting da...read more
Q12. Explain different algorithms that applies in networking domain
Algorithms used in networking include routing, switching, and security protocols.
Routing algorithms determine the best path for data to travel between devices on a network.
Switching algorithms determine how data is forwarded between network devices.
Security algorithms are used to protect data and prevent unauthorized access.
Examples of routing algorithms include OSPF and BGP.
Examples of switching algorithms include Spanning Tree Protocol and VLANs.
Examples of security algorit...read more
Q13. How does a page fault is serviced
Page fault is serviced by fetching the required page from disk to memory.
When a process tries to access a page that is not in memory, a page fault occurs.
The operating system then checks if the page is present in the disk.
If the page is not present in the disk, it results in a segmentation fault.
If the page is present in the disk, it is fetched to memory and the process continues.
The process is then restarted from the instruction that caused the page fault.
Q14. How does a router routes a packet
A router routes a packet by examining the destination IP address and forwarding it to the appropriate network.
The router receives a packet from a device on one of its interfaces
The router examines the destination IP address in the packet header
The router looks up the destination IP address in its routing table
The router forwards the packet to the appropriate interface based on the routing table
If the destination network is not in the routing table, the router drops the packet...read more
Q15. What is page fault
Page fault is an error that occurs when a program tries to access a page that is not currently in physical memory.
Occurs when a program tries to access a page not in physical memory
Operating system retrieves the page from disk to physical memory
Can cause performance issues if it happens frequently
Can be caused by insufficient memory or memory fragmentation
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month