Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The numbers are not sorted in descending orders. At least the first part of the numbers. The last ones are sorted in descending orders. Can

The numbers are not sorted in descending orders. At least the first part of the numbers. The last ones are sorted in descending orders. Can someone please check. I am attaching the compiler too. Thank you image text in transcribedimage text in transcribed

Project Classes Debug GenAlgo General.h GeneralAlgorithm main.cpp E General.h GeneralAlgorithm.cpp main.cpp 53 int GeneralAlgorithm:: random_value(int range, long seed) { 54 srand(seed); 55 double generator = (double) rand() / (double) RAND_MAX; 56 double random = double(range * generator); 57 return (int) random; 58 } 59 60 void GeneralAlgorithm::generatelist() { 61 for(int i = 0; i (std::chrono:: system_clock:: now().time_since_epoch()).count(); 63 initial[i] = random_value(m, nanoseconds/(i+1)) + 1; 64 65 } 66 void GeneralAlgorithm:: sortlist() 67 { 68 cout>.count(); ) ) ) ) ) 59 RuntimeMeasure instance has been created successfully with timestamp 1614989100804. 60 61 62 GeneralAlgorithm instance has been created successfully. 63 64 HAssigned values: 65 66 in = 10 67 68 General Algorithm Output 69 70 General Algorithm sorted in descending order: {16 , 12 , 18 , 11 , 12 , 19 , 9 , 4 , 16 , 2 , } 71 {16 18 12 12 19 11 9 16 4 2 72 {16 18 12 19 12 11 16 9 4 2 } 73 {16 18 12 19 12 16 11 9 4 2 } 74 {16 18 12 19 16 12 11 9 4 2 } 75 |{16 18 12 19 16 12 11 9 4 2 } 76 18 12 19 16 12 11 9 4 2 } 77 {16 18 78 12 19 16 12 11 9 2 } 79 {16 18 12 19 16 12 11 9 4 2 } 80 |{16 18 12 19 16 12 11 9 4. 2 } 81 General Algorithm initial list is: (16, 18, 12, 19, 16, 12, 11, 9, 4, 2) 82 83 RuntimeMeasure instance with created timestamp 1614989100804 has been cleaned up and destroyed. 84 GeneralAlgorithm instance has been cleaned up and destroyed. Resources dh E > ) ) ) ) ) ) > ) ) ) ) ) _{16 > ) ) 4 st ) ) ) ) ) ) ) > ) ) ) 28 Compiler Abort Compilation Compi Process exited after 4.751 seconds with return value o Er press any key to continue Warnings<>

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

Have roles been defined and assigned?

Answered: 1 week ago