no.
k is a constant. It could be about N, or it could be 1 or 2.
doesn't matter … lets talk worst case of K = N-1.
now you have N+N+(N-1) which is just about 3N. but big-O ignores constants.
its O(n).
also, your algorithm is probably not optimal. You can probably write it in N iterations with some creativity. You need to find 2 things. you can search for them both in one loop through it. after finding them, you can break the pointers and assemble it in 2 chunks.