목록SinglyLinkedList (1)
어흥
[해커랭크] Insert a Node at the Tail of a Linked List (C++)
문제 링크: www.hackerrank.com/challenges/insert-a-node-at-the-tail-of-a-linked-list/problem?h_r=internal-search Insert a Node at the Tail of a Linked List | HackerRank Create and insert a new node at the tail of a linked list. www.hackerrank.com 1. 주의할 점 - 파라미터로 넘겨받은 head가 nullptr인 경우 예외처리를 해주면 된다 2. 구현 - 단방향 링크드 리스트 노드로 구성되어 있어서, head와 같은 주소를 저장할 rtnList를 미리 생성한다 - 새로 생성한 링크드 리스트 노드 node를 미리 만들어 놓는..
알고리즘/HackerRank
2021. 1. 14. 16:38