Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given two parallel arrays, one of them containing names of persons and the other containing their corresponding heights ( in feet ) , arrange the

Given two parallel arrays, one of them containing names of persons and the other containing their corresponding heights(in feet), arrange the persons in descending order of their heights and print the names. Both the arrays are of equal size (N) having unique elements.
Reading from standard input is already given and print the output to the standard output stream.
Input format:
First-line contains the array size N. Second-line contains the name of the persons separated by a comma and the third line contains the height of the respective persons separated by a comma.
Output format:
Print the comma-separated person names depending on the descending order of their heights.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions