Skip to content

Clone Graph #259

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

Labels

Comments

@DaleSeo
Copy link
Member

DaleSeo commented Aug 5, 2024

@DaleSeo DaleSeo converted this from a draft issue Aug 5, 2024
@DaleSeo DaleSeo added the problem label Aug 5, 2024
@wogha95 wogha95 mentioned this issue Sep 29, 2024
9 tasks
@jdalma jdalma mentioned this issue Sep 30, 2024
8 tasks
@obzva obzva mentioned this issue Sep 30, 2024
9 tasks
@haklee haklee mentioned this issue Sep 30, 2024
9 tasks
@EgonD3V EgonD3V mentioned this issue Oct 1, 2024
9 tasks
@KwonNayeon KwonNayeon mentioned this issue Jan 27, 2025
10 tasks
@gwbaik9717 gwbaik9717 mentioned this issue Jan 27, 2025
9 tasks
@Jeehay28 Jeehay28 mentioned this issue Jan 27, 2025
10 tasks
@limlimjo limlimjo mentioned this issue Jan 27, 2025
10 tasks
@neverlish neverlish mentioned this issue Jan 28, 2025
10 tasks
@Chaedie Chaedie mentioned this issue Jan 28, 2025
10 tasks
@yolophg yolophg mentioned this issue Jan 28, 2025
10 tasks
@YeomChaeeun YeomChaeeun mentioned this issue Jan 28, 2025
8 tasks
@mmyeon mmyeon mentioned this issue Jan 28, 2025
10 tasks
forest000014 added a commit to forest000014/leetcode-study that referenced this issue Jan 28, 2025
@forest000014 forest000014 mentioned this issue Jan 28, 2025
10 tasks
@GangBean GangBean mentioned this issue Jan 29, 2025
18 tasks
@gmlwls96 gmlwls96 mentioned this issue Jan 29, 2025
10 tasks
@dusunax dusunax mentioned this issue Jan 29, 2025
10 tasks
@soobing soobing mentioned this issue May 19, 2025
12 tasks
ayosecu added a commit to ayosecu/leetcode-study that referenced this issue May 20, 2025
river20s added a commit to river20s/leetcode-study that referenced this issue May 22, 2025
- 원본 노드 객체를 key로, 복사본 노드 객체를 value로 갖는 clones_map을 사용해 이미 복제되었는지 체크하도록 합니다.
- DFS를 활용해 재귀적으로 깊은 복사를 수행하는 dfs_clone() 함수를 작성했습니다. clones_map에 지금 보고 있는 원본 노드가 있다면 바로 복사본 노드를 반환합니다.
- 새 노드를 만들고 val을 복사한 후, 곧바로 clones_map에 매핑하도록 하여 무한 루프를 방지했습니다.(그래프가 연결되어 있어, 이웃을 복제하다가 계속해서 재귀 호출하는 경우 방지)
crumbs22 added a commit to crumbs22/leetcode-study that referenced this issue May 22, 2025
@hsskey hsskey mentioned this issue May 23, 2025
12 tasks
@taurus09318976 taurus09318976 mentioned this issue May 31, 2025
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant