{"action":"opened","issue":{"url":"https://api.github.com/repos/formfoxk/Algorithm/issues/2","labels_url":"https://api.github.com/repos/formfoxk/Algorithm/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/formfoxk/Algorithm/issues/2/comments","events_url":"https://api.github.com/repos/formfoxk/Algorithm/issues/2/events","html_url":"https://github.com/formfoxk/Algorithm/issues/2","id":97547321,"number":2,"title":"간단한 큐 사용법","user":{"login":"kbu1564","id":7445459,"avatar_url":"https://avatars.githubusercontent.com/u/7445459?v=3","gravatar_id":"","url":"https://api.github.com/users/kbu1564","html_url":"https://github.com/kbu1564","followers_url":"https://api.github.com/users/kbu1564/followers","following_url":"https://api.github.com/users/kbu1564/following{/other_user}","gists_url":"https://api.github.com/users/kbu1564/gists{/gist_id}","starred_url":"https://api.github.com/users/kbu1564/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbu1564/subscriptions","organizations_url":"https://api.github.com/users/kbu1564/orgs","repos_url":"https://api.github.com/users/kbu1564/repos","events_url":"https://api.github.com/users/kbu1564/events{/privacy}","received_events_url":"https://api.github.com/users/kbu1564/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-27T20:24:32Z","updated_at":"2015-07-27T20:24:32Z","closed_at":null,"body":"큐 초기화\r\n```c\r\nint queue[10000] = {0, };\r\nint front = 0, rear = 0;\r\n```\r\n\r\n큐의 데이터 Push ( 100, 200, 300 )\r\n```c\r\nqueue[front++] = 100;\r\nqueue[front++] = 200;\r\nqueue[front++] = 300;\r\n```\r\n\r\n큐의 데이터 Pop\r\n```c\r\nint data1 = queue[rear++]; // 100\r\nint data2 = queue[rear++]; // 200\r\nint data3 = queue[rear++]; // 300\r\n```\r\n\r\n큐에 데이터가 존재하는 동안 루프 돌리기\r\n```c\r\nwhile (rear < front) {\r\n    // ...\r\n}\r\n```"}}