This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ์ข ๋ง๋ถ์์ ํ์๋ ๋ฌธ์ . ์ผ๊ฐํ ๋ชจ์๋ง ๋ค๋ฅด๋ค. | |
| # cache[i][j] ๋ณด๋ค f ์คํธ๋ง์ ์ฌ์ฉํ 1์ค dict ๊ฐ ํจ์ฌ ๋น ๋ฅด๋ค. | |
| # ์ด๊ฒ ๋ฐ๋ณต์ผ๋ก ํ ์ ์๋ ๋ฌธ์ ์ธ๊ฐ? | |
| cache = {} | |
| def move(triangle, i, j): | |
| ''' | |
| ํ์ฌ ์์น์์ ๋ด๋ ค๊ฐ์ ๋ ์ป์ ์ ์๋ ์ต๋๊ฐ์ ๋ฐํํฉ๋๋ค. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| solution = lambda t, l = []: max(l) if not t else solution(t[1:], [max(x,y)+z for x,y,z in zip([0]+l, l+[0], t[0])]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package buv.co.kr.util.youtube;/* | |
| * Copyright (c) 2012 Google Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
| * in compliance with the License. You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software distributed under the License | |
| * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def alter_alpha(to): | |
| num = ord(to) | |
| return num - 65 if num < 79 else 90 - num + 1 | |
| def traverse(done, i): | |
| # TODO ; left_cnt ๋ณด๋ค right_cnt ๊ฐ ํฌ๋ฉด right ํ์์ ์ค๋จ ํ๋ ์ต์ ํ๊ฐ ๊ฐ๋ฅํ ๊น? ๋ต์ ์ํฅ์ด ์์๊น? | |
| # ๊ธฐ์ ์ฌ๋ก | |
| if False not in done: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dis | |
| def recursive_sum(n): | |
| print('recursive ํธ์ถ', n) | |
| if n == 1: | |
| return 1 | |
| return n + recursive_sum(n-1) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Mother: | |
| my_varialbe = 3 | |
| def _func(self): | |
| print('func ํธ์ถ') | |
| def func_caller(self): | |
| print('์ฌ๊ธฐ์ ๋ก๊ทธ๋ฅผ ์ฐ๋ฉด ๋ฉ๋๋ค: {}'.format(self.my_variable)) | |
| self.func() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # hi |
NewerOlder