본문 바로가기

이중 링크드 리스트 연결 리스트(Linked List)에 대한 설명은 이미 포스팅 되어 있으므로 자세한 설명은 생략하겠다. 이중 연결 리스트는 아래 그림을 보면 이해하기 쉬울 것이다. 연결 리스트 이중 연결 리스트 이중 연결 리스트(Doubly Linked List)는 연결 리스트의 탐색 기능을 개선한 자료구조이다. 연결 리스트는 노드를 찾으려면 HEAD에서 TAIL 방향으로만 탐색을 할 수 있는데 반해 이중 연결 리스트는 양방향으로 탐색이 가능하다. 구조체로 표현하면 아래와 같다. typedef struct tagNode { int Data; Struct tagNode* PrevNode; Struct tagNode* NextNode; } Node; 간단히 설명하면 PrevNode는 자신 Node 앞 Node를 가리키고 N..
링크드 리스트 자료의 수가 정해져있다면 배열을 사용하면 된다. 하지만 대부분의 경우 자료의 수가 정해지지 않는다. 이럴 경우 정적인 배열 대신 동적인 연결 리스트(Linked List)를 사용한다. 리스트 내의 각 요소는 노드(Node)라고 한다. 노드(Node) 는 데이터를 보관하는 필드와 다음 노드와의 연결 고리 역할을 하는 포인터로 이루어진다. 필드와 포인터로 이루어진 노드들을 다음 그림처럼 연결하면 연결리스트가 된다. 리스트의 첫 번째 노드를 HEAD라 하고 마지막 노드를 TAIL이라고 한다. C 언어를 이용하여 간단한 연결 리스트를 만들어보겠다. 우선 연결 리스트의 주요 연산은 노드 생성/소멸, 노드 추가, 노드 삭제, 노드 삽입, 노드 탐색이 있다. 노드 생성/소멸, 노드 추가, 노드 삭제, 노드 삽입은 연..
accordion action (material ui) AccordionActions API The API documentation of the AccordionActions React component. Learn more about the props and the CSS customization points. Import import AccordionActions from '@material-ui/core/AccordionActions'; // or import { AccordionActions } from '@material-ui/core'; You can learn more about the difference by reading this guide. Component name The MuiAccordionActions n..
react 블로그 만들기 미리 설치해야 할 프로그램 npm or yarn npx 프로젝트 생성 npx create-react-blog react-blog cd react-blog npm start 만약 typescript 를 사용하시려면 npx create-react-blog react-blog --typescript 설정 방법 포스트를 수정하려면, src/pages/posts/2019-01-05-welcome/document.mdx 파일을 수정. 사이트 타이틀을 수정하려면, src/siteMetadata.js 파일에 메타데이터 수정. 프로필을 수정하려면, src/components/Bio.js 파일을 수정. 사이트 색상을 수정하려면, src/index.module.css 파일에서 :root 수정. 새로운 포스트를 생성하려면, ..
리액트 class -> fn 참고 https://scotch.io/tutorials/5-ways-to-convert-react-class-components-to-functional-components-w-react-hooks react 16.8 (hooks) 이상 개인적인 의견 class 보다 functional 이 가독성이 높음 1. state 또는 lifecyce 이 없는 클래스일 경우 class import React, { Component } from "react"; class App extends Component { alertName = () => { alert("John Doe"); }; render() { return ( This is a Class Component Alert ); } } export default..
리액트 functional 라이프 사이클 lifecycle componentDidMount import React, { useState, useEffect } from "react"; function ComponentDidMountExample(props) { useEffect(() => { TestAPI.request(); }, []); return test; } componentDidUpdate import React, { useState, useEffect } from "react"; function Example() { const [count, setCount] = useState(0); // Similar to componentDidMount and componentDidUpdate: useEffect(() => { // Update ..
리액트 라이프사이클 Mount constructor componentWillMount render componentDidMount Update prop, state 변경 componentWillReceiveProps shouldComponentUpdate componentWillUpdate render componentDidUpdate State Change shouldComponentUpdate componentWillUpdate render componentDidUpdate Unmounting componentWillUnmount
구글 애드센스 적용기 # 구글 애드센스? 블로그를 보면 포스트 사이사이 광고를 본 적이 있을 것 입니다. ![구글 광고](https://78.media.tumblr.com/747b102f9e612247d8e6607cbf914c2c/tumblr_inline_p5bmznKAKx1rakgbw_540.png) 구글에서 주는 광고를 블로그나 홈페이지에 게재하고 노출에 따라 수익을 얻는 것입니다. # 적용 방법 ## 1. 구글 애드센스 가입 https://www.google.co.kr/adsense 절차에 따라 가입을 하면 됩니다. ## 2. 코드 삽입 ![](https://78.media.tumblr.com/a4bc5416d289e65c1407fc1a7c86d59a/tumblr_inline_p5bn4jSRIJ1rakgbw_540.pn..