The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 406 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
1. Description :
A digital computer in AD 4th century used linked lists as its internal representation of
positive integers (in the binary form). Read two positive integers, ione and itwo (could be
very long integers), and carry out one of the following arithmetic operations to get the third
(ithree). The input numbers are given in the decimal form.
Sx Print the number of nodes in the linked list representation of x (1, 2 or 3)
A Add ione and itwo and store result in ithree.
M Multiply ione and itwo and store result in ithree.
P Print ithree in decimal form.
Input Format:
A single line consisting of two integers ione and itwo. And then N followed by N
instructions one in each line.
Output Format:
As described above.
Sample Input :
9347538975384535 328749237423423947
6
S1
S2
M
S3
A
P
2
Sample Output:
54
59
112
338096776398808482
2. Description:
Read two strings from the keyboard character by character. Each string is terminated by a
new line. Represent both of them as linked lists in the memory with start pointing to the first
characters. Now remove from the first string all characters which are present in the second
string.
Input Format:
First string on line1 and second on line2
Output Format:
Single line
Sample Input :
RAILROAD CROSSING WITHOUT ANY VOWELS
AEIOUY
Sample Output:
RLRD CRSSNG WTHT N VWLS
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll