Construct binary palindrome by repeated appending and trimming
I suspect that when n is not a mutiple of k then you may not get the desired wrapping effect.

In particular, let me interpret "after every k places from the start" as "the (k+1)th position in the array" - assuming 1-based indexing. Then in the given example on that page, with k = 4 and n = 10, your algorithm produces 1 0 0 0 1 1 0 0 0 1 - which is not a 4-length binary string being repeated and wrapped off at the end (the right answer would be 1 1 0 0 1 1 0 0 1 1. 

If I am off-by-one on interpreting "k places from the start" (so say you were refering to the kth position), then even with n = 5 and k = 3 we get 1 0 1 0 1, whereas the right answer would be 1 1 0 1 1.