tamashionuth
BAN USER- 0of 0 votes
AnswersGiven an array of ints (positive numbers) find out the index that balances the array. If no such index exists, return the index that minimizes the difference.
- tamashionuth in United States
How can you do it by touching each element only once.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Algorithm - 0of 0 votes
AnswerInsert an int into a circular single linked list.
- tamashionuth in United States
Discuss corner cases: what if the element to be inserted is the smallest, how can we speed things up (e.g. if the method is called multiple times you can keep track of the "last"/greatest element).
Thorough testing discussions.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Algorithm - 2of 2 votes
AnswersGiven a number (integer) as a string turn in into a number:
- tamashionuth in United States
E.g. "One million two hundreds thousands fifty seven" => shoud return 1200057.
How to model it and how to test it? What data structures would you use. Deep testing (corner cases)| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Algorithm - 1of 1 vote
AnswersGiven a number N, write all possible sums of consecutive numbers that add up to N.
- tamashionuth in United States
That is:
return all pairs (a, k) such that a+(a+1)+...+(a+k)=n
After that:
1. what if N is negative or a is negative;
2. what if N is real and the possible implications of this| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Algorithm
Yes, this was the correct approach.
- tamashionuth January 03, 2016Yep, this is the expected answer.
- tamashionuth January 03, 2016
Repshanitajjana, +27655765355 SSD MONEY CLEANING CHEMICAL +27655765355 BLACK MONEY IN JOHANNESBURG, OMAN, SAUDI ARABIA, SUDAN, Somalia ,Zimbabwe Botswana at 247quickbookshelp
Hi I am Shanita from San Bernardino USA. I am working as a manager in flore company. I am outgoing ...
Repdianacloweryd, Developer Program Engineer at Accolite software
I am Diana from Reston USA . I work as an Agricultural and food science technician in Jumbo Sports. I help ...
On the real number N case, the trick was with rounding errors. There, the interviewer said that we should think of step size (e.g. e=0.00001) to remove the rounding errors.
- tamashionuth January 03, 2016