anony
BAN USER
- 1of 1 vote
Answersdown vote
- anony in India
favorite
Consider the following series:
A := 1
B := A*2 + 2
C := B*2 + 3 and so on...
Write a program that:
-outputs the number corresponding to a given letter;
-given a string of letters like 'GREP', computes the sum of the numbers corresponding to all the letters in the string (i.e., G + R + E + P), as given by the above series; and
-given a large number (that would fit into a standard 32-bit integer), finds the shortest string of letters corresponding to it. You may use a greedy approach for the last part. Compute the values of the numbers corresponding to letters as and when required and DO NOT pre-compute beforehand and store them in a data structure.| Report Duplicate | Flag | PURGE
Amazon Software Developer Algorithm - -3of 3 votes
AnswersC++ Questions
- anony in United States| Report Duplicate | Flag | PURGE
Morgan Stanley SDE1
Repjoycejflora, Android Engineer at ABC TECH SUPPORT
I am excited about cooperation and interesting projects. Last year I work for a person who provides the black magic ...
Repnancyhfloress, Computer Scientist at AMD
Hey there, I’m Nancy. I’m a small business owner living in Sunrise, FL 33323. I am a fan ...
Repashleymbosse, Associate at Accenture
I am an enthusiastic, hard-working and disciplined Catering Assistant with excellent track-record in working in the food industry. I am ...
Repjonej8821, Blockchain Developer at Alliance Global Servies
I am EbonyTuckson .I am a teacher who works in High school. I work during school hours but may also ...