Write a method to print

  

1. Write a method to print a (singly) linked list of integers in reverse order using a stack. (Pseudocode, assuming that a stack class is already defined for you) .

2. Assume that a queue is implemented with a circular array. Write a method in Pseudocode to calculate the sum of all elements in the queue.

3. A palindrome is a string that reads the same forward and backward. For example, “Able was I ere I saw Elba “. Write a program to determine whether a string is palindrome.

4. Write a program to add two large integers with up to 300 digits. One approach is to treat each number as a list, each of whose elements is a block of digits of that number, then add two integers (lists), element by element, carrying from one element to the next when necessary.

Tags: No tags