목록리스트 (3)
어흥
문제 링크: https://programmers.co.kr/learn/courses/30/lessons/81303 코딩테스트 연습 - 표 편집 8 2 ["D 2","C","U 3","C","D 4","C","U 2","Z","Z"] "OOOOXOOO" 8 2 ["D 2","C","U 3","C","D 4","C","U 2","Z","Z","U 1","C"] "OOXOXOOO" programmers.co.kr 1. 주의할 점 - 어렵다... 많이 어렵다(이전 인턴 문제에 비해 난이도가 급 상승했다) - 세그먼트 트리 or 리스트 or STL에 대한 이해도가 높은 해결 할 수 있다 2. 구현 - 세그먼트 트리 or 리스트로는 아직 풀어보지 않아서 Set을 통해 해결했다(조만간 세그먼트 트리, 리스트로도 풀어..
문제 링크: www.hackerrank.com/challenges/get-the-value-of-the-node-at-a-specific-position-from-the-tail/problem?h_r=internal-search Get Node Value | HackerRank Given the head of a linked list, get the value of the node at a given position when counting backwards from the tail. www.hackerrank.com 1. 주의할 점 - List의 수를 알고 있어야 한다 - Head의 포인터를 새로운 포인터가 저장하고 있어야 한다 2. 구현 - 2가지의 방법으로 풀었다 [List크기 구하기 + 앞에서부터..
문제 링크: www.hackerrank.com/challenges/compare-two-linked-lists/problem?h_r=internal-search Compare two linked lists | HackerRank Compare the data in two linked lists node by node to see if the lists contain identical data. www.hackerrank.com 1. 주의할 점 - 길이가 다를 경우에 대한 예외 처리를 한다 - 값이 다를 경우에 대한 예외 처리를 한다 2. 구현 - head1과 head2가 가리키는게 NULL이라면 true를 반환한다 - 둘중 하나만 NULL을 가리킨다면 false를 반환한다 - 둘다 NULL이 아닐 경우,..