Microsoft Interview Report
- 0of 0 votes
AnswersWrite a method that takes a given string and replaces all occurrences of one string with another string, returning the number of replaces made. For instance given the string “Microsoft” if you were to replace all occurrences of “ic” with “MSFT” the result would be “MMSFTrosoft” with a return value of 1. As part of a final solution please provide unit tests done as well as any test cases ran. Please note that you may not use String.Replace or string::replace depending upon the language you use; you must write this functionality yourself.
- warunthambi June 10, 2014 in India for teamviewer| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Coding - 0of 0 votes
AnswersWrite a class that represents a minimal heap. The heap class should at a minimum support the following methods:
- warunthambi June 10, 2014 in India for teamviewer
- AllocTinyHeap() which should initialize the heap with a given amount of bytes
- DeleteTinyHeap() which frees all memory associated with the heap
- TinyAlloc() which allocates a given number of bytes on the heap if there is room
- TinyFree() which frees a specific location on the heap
You may define whatever parameters are necessary for the above methods as well as write any additional methods. Overall consideration will be given to correctness, design, code readability as well as any unit testing done. As part of a final solution please submit test cases you used to verify correctness in addition to any unit tests done.| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Coding - 0of 0 votes
AnswersImplement a class that does string manipulation by overloading the following operators: <<, >>, = and ==. For example consider the following code:
- warunthambi June 10, 2014 in India for teamviewer
StrShift example;
example = “Microsoft”;
printf(“\”example << 2\” results in %s\n“, example << 2);
In the above code the output would be “ftMicroso” which shows the last two characters of the string “Microsoft” rotated to the left of the string. Please note that state is maintained so two calls of example << 1 would give the same end result as calling example << 2 once. Consideration will be given to correctness, design, code readability as well as any unit testing. As part of a final solution please submit test cases you used to verify correctness in addition to any unit tests done.| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Coding