What would be the best way for a program P to store the frequencies?

4Comments
shivani @shivani1234
11 Aug 2017 01:22 pm

an array of 50 numbers is sufficient ,just store marks (m) ranging from 51 to 100 and store no. of students having m marks at a[m] .

set2018 @setgate
11 Aug 2017 05:50 pm

no getting pls give some another example

shivani @shivani1234
11 Aug 2017 10:11 pm
  • just consider the example of 500 students where student is passed only if he gets more than 50 marks in exam , and maximum marks in exam is 100, and you have to keep record of only pass students , with each passing marks store no. of students who got that particular mark.
  • Then , what you will do ? think ...
    You will just maintain an array having range from 51 to 100 and count no. of students having 51 marks, 52 ,.. 100 marks and store frequency of students in those cells.

    12 3 11 34 11 34 14 14 .... 8
    51 52 53 54 55 56 57 58 ... 100

     

set2018 @setgate
12 Aug 2017 12:14 pm

thnks a lot now got the whole concept

Pages