kamal
BAN USER
Comments (3)
Reputation -5
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
We can make the base class by protecting the constructor... this way it can not be instantiated. Now if you derive a class from it, you wont be able to instantiate it as well. To overcome this problem, we can make derived class constructor public. Now everything look fine. isn't it??
- kamal July 29, 2012Comment hidden because of low score. Click to expand.
0
of 0 vote
IMHO, there can be two solution to this problem:
1. By using std::set, which stores the element in increasing order. Last three entries can be neglected while computing the average.
2. By storing the element in the sorted list and an variable to count the element. Last three element of this list can be ignored while computing the average.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Instead of checking the value of the array element, it should check the address of the array element. Array intersact with each other at some point their value and address should be the same. A value can be duplicate in the array.
- kamal August 02, 2012