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

그래프] 숨바꼭질4 - 백준 13913번 #88

Merged
merged 5 commits into from
Nov 12, 2020
Merged

Commits on Nov 11, 2020

  1. 숨바꼭질4 python 문제 풀이

    - 기존의 숨바꼭질 문제와 다른점은 이동한 경로를 출력해야 한다는 점이다.
    - 따라서 bfs를 돌면서 이동 경로 또한 리스트에 저장했더니 메모리 초과가
      발생하였다.
    - 질문 부분에서 메모리 초과를 방지하는 방법으로 딕셔너리를 사용하는
      방법이 소개되었다.
    - 이를 이용해 이동 경로를 딕셔너리로 저장하였다.
    Kwakcena committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    33f5857 View commit details
    Browse the repository at this point in the history
  2. Refactoring

    다음 위치에 대한 접근을 for문으로 바꿈
    Kwakcena committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    c5ae82c View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2020

  1. CPP 메모리 초과

    - 20만개를 생성하니 메모리 초과가 발생하는 것 같다.
    - cpp에서는 딕셔너리같은 자료구조가 있나?
    Kwakcena committed Nov 12, 2020
    Configuration menu
    Copy the full SHA
    428d1ab View commit details
    Browse the repository at this point in the history
  2. CPP의 딕셔너리인 map을 이용한다

    map을 이용해서 이동한 경로를 저장하여 문제 풀이
    Kwakcena committed Nov 12, 2020
    Configuration menu
    Copy the full SHA
    3b8a7cb View commit details
    Browse the repository at this point in the history
  3. 시간 단축

    map을 쓰지 않고 일반 배열을 선언하여 지나온 경로를 저장하였더니 시간이
    크게 단축되었다.
    Kwakcena committed Nov 12, 2020
    Configuration menu
    Copy the full SHA
    362308f View commit details
    Browse the repository at this point in the history