Skip to content

매칭 알고리즘 구현 #6

Description

@DaleSeo

설명

참여자들을 2인 1조로 매칭하는 핵심 로직

관련 요구사항

  • B-1: 자동 매칭
  • B-3: 중복 매칭 방지
  • B-4: 홀수 처리

작업 목록

  • 기본 랜덤 매칭 (Fisher-Yates 셔플)
  • 중복 매칭 방지: data/history.json에서 최근 매칭 이력 참조
  • 홀수 처리: 마지막 조를 3인으로 구성
  • 매칭 결과를 history.json에 저장

history.json 구조

{
  "matches": [
    {
      "date": "2024-01-15",
      "pairs": [
        ["user_id_1", "user_id_2"],
        ["user_id_3", "user_id_4"],
        ["user_id_5", "user_id_6", "user_id_7"]
      ]
    }
  ]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions