본문 바로가기

전체 글195

Prefix function, Knuth-Morris-Pratt algorithm Prefix function definition $$ \pi[i] = \max_{k=0 ... i} k: s[0 ... k - 1] = s[i - (k - 1) ... i) \text{ for string }s$$ Implementation vector prefix_function(string s) { int n = (int)s.length(); vector pi(n); for (int i = 1; i 0 && s[i] != s[j]) { j = pi[j - 1]; } if (s[i] == s[j]) { j++; } pi[i] = j; } return pi; } Application 1. Search for a substring .. 2022. 1. 17.
Following materials 1. 프로그래밍 대회에서 배우는 알고리즘 문제해결전략 1, 2 - 구종만 알고리즘 문제 해결 전략 프로그래밍 대회에서 배우는 알고리즘 문제 해결 전략, 구종만 지음, 인사이트, ISBN 978-89-6626-054-6 새 소식 책 소개 은 새로운 알고리즘 책입니다. 종이에 적힌 의사코드 book.algospot.com 2. Algorithms for Competitive Programming Main Page - Algorithms for Competitive Programming cp-algorithms.com 2022. 1. 17.
책 한 무더기 딥 워크 요즘 산만함을 느끼고 있어 책의 아이디어로부터 도움을 받기위해 구매했다. 지금 알려줄게요 미국대학원 미국대학원 유학 준비생들이 필수적으로 사야할 책으로 알고 있어서 호기심에 구매하였다. 유학을 위해 어떤 노력을 했을지가 궁금하다. clean architecture, 리팩터링 개발 관련 책을 찾다가 추천이 많길래 구매함. 알고리즘 트레이닝 종만북을 다 때고 보려고 미리 구매했다. 보기까지 한참 걸릴 것 같긴 한데.. Cracking the coding interview 코딩 인터뷰의 바이블 같은 책이라 듣고 구매했다. '22 자기개발 비용 사용 완료! 2022. 1. 16.
30. Mastering The Terminal 305. Why Do We Need to Know Terminal Commands? - Speed, access, many tools - Terminal: A text-based interface to computer. Originally a physical object, but now we use software terminals. - Shell: The program running on the terminal. - Bash: One of the most popular shells 306. The Basics: ls & pwd - ls: List files and directories - pwd: Print working directory 307. Changing Directories - cd: Cha.. 2022. 1. 16.