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 - ChaeheeKang-GitHub #188

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

[Week 6] SORTGAME self review - ChaeheeKang-GitHub #188

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

Comments

@chaeheekang
Copy link
Collaborator

SORTGAME self review

1. 해결 시도 과정

크기 비교를 위해 대소관계를 기준으로 일반화 하는 과정을 마쳤습니다.

2. 작성한 코드와 설명

def genralize(sortgame):
    l=len(sortgame)
    for i in range(N):
        smaller=0
        for j in range(N):
            if sortgame[j]<sortgame[i]:
                samller+=1
        fixed[i]=smaller
    return ''.join(str(i) for i in arr)

3. 막힌 점 및 개선 사항

bfs부분이 막혔습니다. 현재까지 진행한 상태는 다음과 같습니다.

def bfs(start,length):
    queue=deque()
    queue.append((start,0))
    
    while queue:
        now,level=queue.popleft()
        
        for i in range(len(now)):
            for j in range(i+1,len(now)):
                now[i:j+1]=now[i:j+1][::-1]
                string=''.join(now)
                            
@chaeheekang chaeheekang 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