Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Week 6] SORTGAME self review - profitjean #191

Open
profitjean opened this issue Mar 3, 2022 · 0 comments
Open

[Week 6] SORTGAME self review - profitjean #191

profitjean opened this issue Mar 3, 2022 · 0 comments
Labels
2기 스터디 2기 WA Wrong Answer

Comments

@profitjean
Copy link
Collaborator

SORTGAME self review

1. 해결 시도 과정

BFS로 풀이를 해보려고 했고, 입력데이터를 최적화한다는 것에 초점을 두어
길이를 8로 통일시켜준뒤에 최소 정렬 횟수를 계산하려고 했습니다.

2. 작성한 코드와 설명

import sys
from collections import deque
input = sys.stdin.readline
def bfs(start, length):
    queue = deque()
    queue.append((start, 0))

case = int(input().rstrip())
dp = {}
array = [str(num+1) for num in range(8)]
# bfs 호출해야함
for _ in range(case):
    n = int(input().rstrip())
    array = list(map(int, input().rstrip().split()))
    sorted_array = list(sorted(array))
    mapped = dict(zip(sorted_arr, range(1,N+1)))

3. 막힌 점 및 개선 사항

아직 구현하지 못한 bfs 부분은
큐의 값이 존재하는 동안반복문을 통해 구현을 해보려고 했습니다.

@profitjean profitjean added WA Wrong Answer 2기 스터디 2기 labels Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2기 스터디 2기 WA Wrong Answer
Projects
None yet
Development

No branches or pull requests

1 participant