First and foremost, to dispel rumors from the comments: the owner of this content did not send the DMCA notice. It actually was sent by an attorney from PayPal. The author had tried to vandalize several posts after he was told by PayPal he had shared proprietary code, but ultimately their legal team was still responsible for going over him and sending a notice that involved 32 questions.
Simply put, we do not process DMCA notices that come from the the person who posted the content. That wouldn't even make sense. If you are claiming ownership of the content in the DMCA, then you as the owner already had authorization to post the content and license the content to us and there are no problems. We do not accept DMCA notices as a bypass for deletion restrictions in our systems. They are not a way to change your mind.
How this apparently simple post is violating PayPal's copyright?
I couldn't tell you. That particular question seems to have nothing to do with PayPal. It's explicitly asking about a LeetCode problem. To be honest, I didn't check every single question of the 32 that got deleted for viability - that's far too time consuming. I just spot check a few examples with huge cases like this.
What is our policy regarding copyright violation?
That's a fairly broad question, and I'm assuming you're just asking about the DMCA process. Our policy is pretty much entirely covered here: What is the policy for DMCA takedowns, and what can we expect in terms of transparency regarding the removed content?
Can't we simply remove the copyrighted portion instead of deleting everything?
Sometimes that is possible, and sometimes it's just not possible to reword a question without that content and there's nothing we can do. Even if it is possible, it's a ton of extra work because we can't only remove it from the question and call it good. We'd also have to redact it from the revision history so the copyrighted content can't be found by simply clicking into the post's history.
Frankly, if there were valid answers in there somewhere, it'd be far easier for another user to simply re-ask the question in a broader way that avoids using anything that might look copyrighted and just re-posting the answer there.