arr=["Beijing","Beijing","Beijing","Tokyo","Tokyo","Tokyo","New York","New York","Paris"] 这个数组共 9 个元素,我想把它分成 3 个区域:0-2,3-5,6-8。我想把它按条件重排,要求每个区域中的三个元素各不相同,而且这 3 个元素随机排列,得到的结果如下所示: result_arr=["Tokyo","Beijing","New York","Paris","Beijing","Tokyo","Beijing","New York","Tokyo"]。怎么解决比较方便?