2095. Delete the Middle Node of a Linked List
LeetCode - The World's Leading Online Programming Learning Platform 연결 리스트의 헤드(첫 노드)가 주어집니다. 중간 노드를 삭제하고 수정된 연결 리스트의 헤드를 반환하세요. 크기가 n인 연결 리스트의 중간 노드는 0부터 시작하는 인덱싱에서 ⌊n / 2⌋ 번째 노드입니다. 여기서 ⌊x⌋는 x 이하의 가장 큰 정수를 나타냅니다. 예를 들어, n이 1, 2, 3, 4, 5일 때 중간 노드는 각각 0, 1, 1, 2, 2입니다. You are given the head of a linked list. Delete the middle node, and return the head of the modified linked list. The middle node..
LeetCode
2023. 10. 24. 23:30