Question: Describe in pseudocode an algorithm IsGreater(A,B) that gets as input two integers A and B expressed in linked lists and returns a boolean value true/false

Describe in pseudocode an algorithm IsGreater(A,B) that gets as input two integers A and B expressed in linked lists and returns a boolean value true/false that tells whether A> B. The integers are expressed so that the first element of the list is the least significant digit of the integer. E.g. if A = 986 and B-674, the corresponding linked list forms are A = (6,8,9) and B = (4,7,6), and the algorithm returns the value true as in this case A> B. A negative number is expressed by adding the item '-' to the end of the list. E.g. the number -175 is expressed in the form (5,7,1, -) Follow-up to the previous problem. Describe in pseudocode an algorithm Subtract (A,B) that gets as input two integers A 2 0 and B 2 0 expressed in linked lists and returns the value A - B expressed in a linked list. E.g. if A- 567 i.e. (7,6,5) and B 847 i.e. (7,4,8), the algorithm gives the result 567-847-_280 in the list form (0,8, 2,-). Note that as it is assumed that both input integers are nonnegative, your algorithm does not need to handle addition of form A-(-B) = A+ B
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
