# Resampling approaches in multi-sample problems

I'm new to bootstrap and I would need an explanation about resampling techniques for comparing two populations. Suppose we have two samples, of respective sample sizes $n_1$ and $n_2$. The total number of individuals is $n = n_1 + n_2$.

We want to use a bootstrap/resampling technique to compare a given statistic (say, the coefficient of variation) between these two samples.

There is the standard approach: drawing with replacement $B$ bootstrap samples of respective sample sizes $n_1$ and $n_2$, calculating the statistic in each bootstrap sample, etc.

There could be another approach: drawing (still with replacement) directly $B$ bootstrap samples of $n$ individuals from the total sample, regardless of the groups. And then, calculating $B$ times the statistic in each sub-group, etc.

My intuition is that the second approach is flawed, but I couldn't explain why in a formal manner. Is such an approach acceptable in some cases / for some statistics, or is it always wrong, and why?

Thanks!