subject

Algorithm End_to_Beginning Step 1. Set all the values in the array H to 0. Step 2. Starting with H[n-1] and going down to H[0] try to increase the value of H[i] as follows: Step 3. Starting with index i+1 and going up to n-1 (the last index in the array A) repeat Steps 4 and 5: Step 4. See if any element is smaller or equal to A[i] and has its H value also bigger to H[i]. Step 5. If yes, then A[i] can be followed by that element in a sorted subsequence, thus set H[i] to be 1 plus the H value of that element. Step 6. Calculate the largest (maximum) value in array H. By adding 1 to that value we have the length of a longest reversely sorted subsequence. Step 7. Identify a longest subsequence by identifying elements in array A that have decreasing H values, starting with the largest (maximum) value in array H.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
On the loan worksheet in cell c9 enter pmt function to calculate the monthly payment for the altamonte springs 2018 facilities loan. ensure that the function returns a positive value and set the reference to cells b5 and b6 as absolute references.
Answers: 2
question
Computers and Technology, 22.06.2019 14:30
If the polar bear were taken out of the food chain what would happen to the seal population the seal population would diminish the seal population would grow dramatically the seal population would stay the same the seal population would decrease slightly
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
question
Computers and Technology, 23.06.2019 03:50
Q-1 which of the following can exist as cloud-based it resources? a. physical serverb. virtual serverc. software programd. network device
Answers: 1
You know the right answer?
Algorithm End_to_Beginning Step 1. Set all the values in the array H to 0. Step 2. Starting with H[n...
Questions
question
Mathematics, 11.03.2021 19:40
question
Mathematics, 11.03.2021 19:40