Given n and k, Construct a palindrome of size n using a binary number of size k repeating itself to wrap into the palindrome. The palindrome must always begin with 1 and contains the maximum number of zeros.
The first line contains an integer T, the number of test cases. For each test case, there are two integers n & k.
For each test case, the output is a palindrome of size n.
1. The 3 sized substring is 110 combined twice and trimming the extra 0 in the end to give 11011.
2. The 8 sized substring is 11...... wrapped to two places to give 11.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.