Question: Given two numbers a and b, we usually say that a is less than or equal to b (denoted by a b) if the value
Given two numbers a and b, we usually say that a is less than or equal to b (denoted by a b) if the value of a is smaller than or equal to b. Here, we define a new relation a b in a different way, as follows. a is said to be less than or equal to b (denoted by a b) if the last digit of a is less than or equal to the last digit of b. For example, 27 is less than 19, since 7 is less than 9. 29 and 39 are said to be equal. 38 is greater than 102. Given n numbers, design a pseudocode to arrange the given numbers in a decreasing order, as per the order defined above. For example: Given the numbers 27, 39, 1, 55, 124. Numbers in the decreasing order are : 39, 27, 55, 124, 1 Also, analyze your algorithm with all the steps required.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
