![]() |
VOOZH | about |
Given a struct array of type Height, find max:
Question source :Microsoft Interview Experience Set 127 | (On-Campus for IDC)
struct Height{
int feet;
int inches;
}
Convert each height into a single comparable unit (inches) and track the maximum while traversing the array once.
mx with minimum value total = feet * 12 + inchesmx if greater value is found max125