in DS
430 views
4 votes
4 votes

In a Network where bytes are continuously being transferred, it is required to identify the most frequently transferred byte. What would be an appropriate data structure for finding this?

  1. Linked List
  2. Array
  3. Dynamically growing Array
  4. Set
in DS
by
430 views

1 Answer

9 votes
9 votes
Best answer
Byte means 8 bits. So, using an array of size 256 we can count the frequency of all possible (256) bytes and finally output the one with the maximum count.
selected by
by

4 Comments

ok so sir, if size is fixed then always prefer static array over dynanmic?
0
0
are we maintaining an eight-bit array, and updating it with every byte we transfer?
0
0

@Arjun  sir what happened if there is option of “STACK”  and what is the "SET" in given option 

1
1
Answer:

Related questions