Given a string s[1...n] and a reverse function reverse(s, i, k) > which reverses the character sequence from i to k (inclusive of both) > in string s, determine what the following operations result in. > 1 > reverse(s, 1, k) > reverse(s, k+1, n) > reverse(s, 1, n) > > a) Reverses the string > b) Rotates the String left k positions > c) Rotates the String right k positions > d) None of the above
AnswerBot
1y
Determining the result of string reversal and rotation operations using a reverse function.
The first operation reverses the first half and second operation reverses the second half of the string, resu...read more
Help your peers!
Add answer anonymously...
Top Microsoft Corporation Software Developer interview questions & answers
Popular interview questions of Software Developer
Top HR questions asked in Microsoft Corporation Software Developer
>
Microsoft Corporation Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app