CS3130 (Design and Analysis of Algorithm Lab) Assignment 2 (Solution)

$ 24.99
Category:

Description

Language : C Programming

Program 1: Write a C Program to implement insertion sort.
Program 2: Write a C Program to implement the Selection sort.

Home Assignment:
The selection committee has to maintain the list of the players for the selection for India A camp. The scores of N players should be recorded with their names from the last season. In case, the scores of two players are same then the name of player which came first will remain above the other.
The effective players will then be selected for the India A Camp. Help Selection Committee to list the players in the correct manner (In decreasing order of their score)

Input Format
The first line of input consist of number of players, N. Next N lines consist of two space separated values name of players and the number of runs he scored.

Constraints
1<= N <=100
1<= |name of player| <=50
0<= score <=1000

Output Format
Print the list of players names from most effective to least effective.

Note: Solve above problem using Insertion and Selection sort separately.

Reviews

There are no reviews yet.

Be the first to review “CS3130 (Design and Analysis of Algorithm Lab) Assignment 2 (Solution)”

Your email address will not be published. Required fields are marked *