I'd say as long as the input of the filter is on the other side, then it is fine. You want circulation, but if I had to choose for myself, I would pick the second drawing. The reason is because you can see all the bettas, and in the first drawing, the bettas in the back would be hard to monitor.
I say divide it like the second one but put the filter in the middle...seems to me the slots on the end would suffer from the filter being way on the other end.
I have 2 15 gal. filters on my 22 gal. divided tank..one on each end..so I am sure everyone gets proper cleaning..since the dividers slow up the filtration process. You could put a sponge filter on one end and a regular filter on the other end.