Microsoft OA | 2023

Microsoft · Question · Posted Jul 2023

Question 1. challenge Tueschpuon A string made of an even number of characters ("<" and/or ">") is called symmetric if all characters in its first half are <" and all characters in its second half are ">". Examples of symmetric strings are: (empty string),"< >", "<< >>", "<<< >>>", etc. Write a function: int solution(string &); that, given a string S made of N characters ("‹", ">" and/or "?")", returns the length of the longest symmetric substring that can be ...

The full answer & interview discussion are available to premium members.

Log in Create a free account