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

[23-02-15] dain.js #102

Merged
merged 3 commits into from
Feb 15, 2023
Merged

[23-02-15] dain.js #102

merged 3 commits into from
Feb 15, 2023

Conversation

da-in
Copy link
Owner

@da-in da-in commented Feb 14, 2023

PR Summary

๐Ÿฅฒ python์€ ์‹ ์ด๋‹ค!

  • ๊ฒŒ์ž„ ๋งต ์ตœ๋‹จ๊ฑฐ๋ฆฌ :
    ์ฒ˜์Œ์— ๊ทธ๋ƒฅ dfs ํ•˜๊ณ ์‹ถ์—ˆ๋Š”๋ฐ, ๋ฐฉ๋ฌธ์ •๋ณด๊ฐ€ ๋…๋ฆฝ์ ์ด์–ด์•ผํ•ด์„œ deepcopy๋ฅผ ์“ฐ๋ ค๊ณ  ๋ดค๋”๋‹ˆ ์ง์ ‘ ๊ตฌํ˜„ํ•ด์•ผํ•˜๋Š” ์ž์Šค๋Š” ๋ฉ‹์ง€๋‹ค.
    ๊ทธ๋ž˜์„œ ์•ˆ์ผ๋‹ค.
    bfs๋กœ ํ’€์—ˆ๋Š”๋ฐ. ์‹œ๊ฐ„์ดˆ๊ณผ ํ•ด๊ฒฐ ๋ชปํ•จ. ์•„๋งˆ python์—์„œ๋Š” ๋˜๋Š” ์ฝ”๋“œ ์•„๋‹๋ž‘๊ตฌ.

  • ๊ตฌ๋ช…๋ณดํŠธ : ๊ทธ๋ฆฌ๋””๋กœ ํ’€์—ˆ๋‹ค. ํ…Œ์ผ€๋Š” ๋งž๋Š”๋ฐ ์ž๊พธ ํ‹€๋ ค์„œ ์™œ์ธ์ง€ ์ฐพ์•„๋ณด๋‹ˆ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์˜ sort๋Š” ๋ฌธ์ž์—ด ๊ธฐ์ค€... (TMI)

    arr = [140, 130, 120, 40, 30, 20]
    arr.sort() // [120,130,140, 20, 30, 40]
    arr.sort((a,b)=>(a-b)) // [20, 30, 40, 120, 130, 140] ๋น„๊ต ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์ˆซ์žํ˜•์œผ๋กœ ๋น„๊ต์‹œํ‚ค๊ธฐ

ISSUE NUMBER

@chs98412
Copy link
Collaborator

chs98412 commented Feb 14, 2023

bfs๋ฅผ ์ผ๋Š”๋ฐ ์‹œ๊ฐ„์ดˆ๊ณผ๋ผ๋‹ˆ.. ํŒŒ์ด์ฌ ๋งŒ์„ธ..!
sort๋„ ํŒŒ์ด์ฌ ๋งŒ์„ธ! ์‚ฌํšŒ์„ฑ ๋„˜์น˜๊ณ  ์œตํ†ต์„ฑ ๋„˜์น˜๋Š” ํŒŒ์ด์ฌ!

@da-in da-in merged commit c5979e5 into main Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants