{"id":23626441,"url":"https://github.com/hojongs/algorithm","last_synced_at":"2025-10-06T06:25:03.061Z","repository":{"id":37923146,"uuid":"383872850","full_name":"hojongs/algorithm","owner":"hojongs","description":"A set of source codes to solve algorithm written in python","archived":false,"fork":false,"pushed_at":"2023-06-01T01:13:43.000Z","size":69,"stargazers_count":3,"open_issues_count":188,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-17T12:07:08.978Z","etag":null,"topics":["algorithm","baekjoon","leetcode","programmers","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hojongs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-07T17:15:22.000Z","updated_at":"2024-06-08T21:48:50.000Z","dependencies_parsed_at":"2024-12-27T23:06:43.503Z","dependency_job_id":null,"html_url":"https://github.com/hojongs/algorithm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hojongs/algorithm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hojongs%2Falgorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hojongs%2Falgorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hojongs%2Falgorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hojongs%2Falgorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hojongs","download_url":"https://codeload.github.com/hojongs/algorithm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hojongs%2Falgorithm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278567363,"owners_count":26007946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","baekjoon","leetcode","programmers","python"],"created_at":"2024-12-27T22:54:06.228Z","updated_at":"2025-10-06T06:25:03.025Z","avatar_url":"https://github.com/hojongs.png","language":"Python","readme":"# Algorithms\n\n## Impressive problems\n\n### DP\n\n- [leetcode/easy/p53.py](https://leetcode.com/problems/maximum-subarray/)\n  - Tabulation (Bottom-up)\n- [leetcode/easy/p70.py](https://leetcode.com/problems/climbing-stairs/)\n  - Memoization (Top-down)\n- [leetcode/easy/p121.py](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)\n  - Tabulation (Bottom-up)\n\n## Leetcode\n\nhttps://leetcode.com/problemset/all/\n\n[my account](https://leetcode.com/hojongs/)\n\n## Baekjoon Online Judge\n\nhttps://www.acmicpc.net/problemset\n\n[my account](https://www.acmicpc.net/user/ssaemo)\n\n### Python tips\n\nPython은 기본적으로 느리다. 이로 인한 시간 초과를 피하기 위해, Python보다는 PyPy를 사용하여 제출하기를 권장한다.\n\n백준 사이트는 IO도 코드에서 직접 처리한다 종종 IO 코드가 시간 초과의 원인이 된다\n\nhttps://www.acmicpc.net/problem/15552\n\nhttps://www.acmicpc.net/board/view/22716\n\nhttps://www.acmicpc.net/blog/view/55\n\nhttps://www.acmicpc.net/blog/view/70\n\nhttps://wiki.python.org/moin/TimeComplexity\n\n- input\n    - sys.stdin.readline() 사용하기 : input() 지양\n        - 단, readline()은 \\n을 포함하므로, 이를 제외하려면 rstrip()을 함께 사용한다\n    - `*` operator를 사용하여 list 초기화하기\n      [reference](https://www.geeksforgeeks.org/python-which-is-faster-to-initialize-lists/)\n        - 수행 시간 2초 이상에서는 영향이 없었다\n    ```python\n    import sys\n\n    n = int(sys.stdin.readline())\n    strs = [0] * n\n    for i in range(n):\n        strs[i] = sys.stdin.readline().rstrip()\n    ```\n- print() 한 번만 호출하기 : print\n    - 라고 썼으나, [15552](https://www.acmicpc.net/problem/15552) 에서는 오히려 시간 초과?가 발생했다\n    ```python\n    output = ''\n    for s in strs:\n      output += s + '\\n'\n    print(output)\n    ```\n- queue 용도로 list 대신 collections.dequeue 사용하기 [reference](https://www.acmicpc.net/blog/view/70)\n- Pypy: print()보다 sys.stdout.write() 사용하여 메모리 절약하기 [reference](https://www.acmicpc.net/blog/view/70)\n- Pypy는 재귀에 약하다? [reference](https://www.acmicpc.net/blog/view/70)\n\n## Programmers\n\nhttps://programmers.co.kr/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhojongs%2Falgorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhojongs%2Falgorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhojongs%2Falgorithm/lists"}