HashedIn by Deloitte Interview Question

Write a program to generate a palindrome binary string of length n. There should be a repeated sequence/ pattern for each interval of size m. The binary string should start with 1. And there should be maximum number of zeros in the string. & 5 minutes time was given

Interview Answer

Anonymous

Oct 14, 2018

It took me 2 minutes to understand the logic & arrive at the simplified method. & I was unable to complete the program in the remaining 3 minutes.