dzdh
V2EX  ›  问与答

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

  •  
  •   dzdh · Nov 24, 2022 · 920 views
    This topic created in 1331 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   ·   916 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 20:52 · PVG 04:52 · LAX 13:52 · JFK 16:52
    ♥ Do have faith in what you're doing.