리트코드 3

[leetcode][Python]234. Palindrome Linked List(4일간의 팰린드롬 연결리스트 해결기🤪)

파이썬 알고리즘 인터뷰 8장이 시작되고 연결리스트 문제를 풀기시작했다. 첫문제인 만큼 어려운 문제는 아닐것이라 생각했는데 이게 왠걸 뭔말인지 잘 이해가 안갔다. 계속 책을 보면서 이해하려고 해봐도 내가 생각하는 이게 맞는건지 잘 이해가가지 않아 https://github.com/onlybooks/algorithm-interview/issues/147 팰린드롬 연결리스트 질문 · Issue #147 · onlybooks/algorithm-interview 212p 에 slow = 2->3이라고 가정해보자. 여기서 slow는 연결리스트이며, slow.next는 3이라는 의미이다. rev = 2->3이 되고, rev.next=1, 이 되어서 rev = 2->1이 된다고 적혀있습니다 slow는 연결리스트로 sl..

(2)파이썬알고리즘인터뷰 - leetCode:[819]Most Common Word

https://leetcode.com/problems/most-common-word/ Most Common Word - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 📌문제 설명 str으로 입력을 받아 그 단어 중 banned 리스트에 없는 단어중 가장 많은 빈도의 단어를 반환하는 문제! def mostCommonWord(self, paragraph: str, banned: List[str]) -> str: 리트코드는 이렇게 함수형태로 주어진다. 이에따라서 리스..