I can't judge the format, but everything else looks fine. The only thing that is concerning me is the filtering that looks a bit too strict in the inner loop.
What's the question?
I can't judge the format, but everything else looks fine. The only thing that is concerning me is the filtering that looks a bit too strict in the inner loop.