dzdh
V2EX  ›  问与答

求教 不限语言 排列组合 按照重复率低优先靠前 有啥好的算法么

  •  
  •   dzdh · Nov 24, 2022 · 856 views
    This topic created in 1285 days ago, the information mentioned may be changed or developed.
    # 假设 N 个数组( 3 个起步)
    a = [1,2,3]
    b = [4,5,6]
    c = [7,8,9]
    
    # 排列组合按照重复率低的靠前 如:
    [
       [1,5,7],
       [2,4,8],
       [3,6,9],
       # 假设本轮 1,4,7 前两组出现超过 3 次,pass
    ]
    

    有啥好的方法嘛

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5901 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 02:45 · PVG 10:45 · LAX 19:45 · JFK 22:45
    ♥ Do have faith in what you're doing.