Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Could anyone help with writing a C program for the following question, thanks? You are asked to sort the spreadsheet based on some sorting criteria.

Could anyone help with writing a C program for the following question, thanks?

image text in transcribedimage text in transcribedimage text in transcribed

You are asked to sort the spreadsheet based on some sorting criteria. The figures below can help you understand the basic idea of this question. You are provided a spreadsheet together with the header and data type of each column (either string, integer or float). Then, the order (either ascending or descending) is also specified. We use lexicographical order for strings, while we use numeric order for both integer and float. You need to output the sorted spreadsheet. All values should look exactly the same as the input. You can safely assume that (i) there are no duplicate rows, (ii) the priority of the sort will start from column 1 to the last column (e.g. if the first three columns are exactly the same, we will continue to column 4. If column 4 is still the same, we will continue to look at column 5). (ii) All strings do not contain space with its length at most 100. B E B 123 1A 2 3 E 12.8 C110 D D Yes No Yes Yes 0.05 0.05 154 12.75 C118 4 165 0.01 12.8 C117 12.73 C117 84 0.05 O UN 6 123 12.6 C118 No 0.01 7 Sort ? X Options... My data has headers *21 Add Level X Delete Level E Copy Level Column Sort On Sort by A Cell Values Then by B Cell Values Then by C Cell Values Then by D Cell Values Then by E Cell Values > Order Smallest to Largest Largest to Smallest A to Z Z to A Smallest to Largest > Order Smallest to Largest Largest to Smallest A to Z Z to A Smallest to Largest

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions

Question

=+employee to take on the international assignment?

Answered: 1 week ago

Question

=+differences in home- and host-country costs of living?

Answered: 1 week ago