https://www.hackerrank.com/challenges/one-week-preparation-kit-merge-two-sorted-linked-lists/problem?isFullScreen=true&h_l=interview&playlist_slugs%5B%5D=preparation-kits&playlist_slugs%5B%5D=one-week-preparation-kit&playlist_slugs%5B%5D=one-week-day-five Merge two sorted linked lists | HackerRank Given the heads of two sorted linked lists, change their links to get a single, sorted linked list...
배열 기반의 리스트는 인덱스 값 기준으로 데이터의 참조가 쉽지만 크기가 초기에 정해져있다는 단점이 있다. 동적 할당 기반의 리스트는 크기의 변경이 가능하다. 문제 04-1 [연결 리스트 관련 코드에 익숙해지기] 연결 리스트는 새로 삽입되는 노드를 tail에 추가한다. 하지만 여기서는 head에 추가되도록 해본다. #include #include typedef struct _node { int data; struct _node *next; } Node; int main() { Node *head = NULL; Node *tail = NULL; Node *cur = NULL; Node *newNode = NULL; int readData; while(1) { printf("enter number: "); s..
- Total
- Today
- Yesterday
- 조합
- binary search
- Tree
- 자료구조
- Python
- Dijkstra
- Implementation
- Spring
- CSS
- greedy
- Unity
- Kruskal
- permutation
- C++
- 이분탐색
- dfs
- back tracking
- MVC
- floyd warshall
- DP
- graph
- C
- db
- two pointer
- 재귀
- BFS
- priority queue
- Stack
- Brute Force
- recursion
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |