Cisco interview question

Can you find an algorithm to count bits with an efficient time complexity? Can you explain TCP/IP and how does it work, and how do packets travel from one host to another across networks. Can you implement merge sort or quick sort?

Interview Answer

Anonymous

23 July 2020

Count the bits using a bit shift operator or you can use bit-wise operation and count the bits using a hashmap. Talk about the layers and what role they do, talk about how packets are encapsulated by IP and TCP then from start host gets sent to router then across networks then to end host. Solve base cases for merge sort and quick sort then recursively call the function on their respective array partition.