Flag Algebra> I have two dimensional integer array x, y...
question mark

I have two dimensional integer array x, y as below
{1160, 0},
{1560, 400},
{11940, 10380},
{12480, 540},
{12540, 60},
{12600, 60},
{12720, 120},
{13120, 400},
{13380, 260},
{13680, 300},
{14000, 320}

I need to pick {13120, 400} since x is highest as well as y is highest when comparing with other y elements matching with x highest value. I am doing this in VB.NET. Your help is greatly appreciated. Thanks.

Rajaram , 8 Years ago
Grade 12th pass
anser 1 Answers
Saurabh Koranglekar
Dear student

An attempt for algorithm can be made as follows

consider 1 as highest

compare and replace (change in x) + (change in y) for all array elements when greater

else ignore and next check
Last Activity: 7 Years ago
star
LIVE ONLINE CLASSES

Prepraring for the competition made easy just by live online class.

tv

Full Live Access

material

Study Material

removal

Live Doubts Solving

assignment

Daily Class Assignments