• Image placeholder
  • 홈 페이지
  • 블로그 센터
  • 범주
Image placeholder

PythonPlus

Part6.7_완전탐색_깊이,넓이 우선탐색활용_송아지 찾기(BFS)

CodingTestalgorithmpythonshouldToRetryPythonPlusCodingTest

Part5.5_완전탐색_부분집합 구하기(DFS)__바둑이 승차__전역변수,지역변수

내가 생각해도 리스트 하나 더 만들어서 append하는 건 비효율 적인데.. time limit 났다.. if name == "main ": 이 아래 선언한 변수는 전역변수로, 어떤 함수에서든 접근 가능하다 !! cnt = 5 #전역변수 생성과 값 할당, 기본적으로 어디서나 접근 가능. DFS1() DFS2() print(cnt) 해답 : 5 def DFS1() print(cnt) # 먼저 ...

CodingTestalgorithmPythonPluspythonCodingTest

© 2022 intrepidgeeks.com

Privacy Policy Contact US Sitemap
🍪 This website uses cookies to ensure you get the best experience on our website. Learn more