Skip to content

Instantly share code, notes, and snippets.

View whoo24's full-sized avatar

Wooyeong Choe whoo24

  • Oslo, Norway
View GitHub Profile
@whoo24
whoo24 / VC10.sublime-build.json
Last active December 15, 2015 22:29
VC10 C++ Sublime Build Script
{
"cmd":
[
"echo", "================================================================","&",
"echo", "building", "&",
"echo", "================================================================", "&",
"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat", "&",
"cl.exe", "${file}", "/EHsc"
],
"encoding": "cp949",
@whoo24
whoo24 / print2bin.cpp
Last active December 15, 2015 22:29
2진수 출력하기 print binary
#include <iostream>
using namespace std;
void print2bin(int d)
{
for(int i = 0; i < 32; ++i)
cout << ((d >> (31 - i )) & 1);
cout << endl;
}
@whoo24
whoo24 / rotate_array.cpp
Created April 8, 2013 02:46
배열 회전시키기 rotate array to right
#include <iostream>
void right_rotate(int arr[], int s, int t)
{
int i, last;
last = arr[t];
for(i = t; i > s; i--)
{
arr[i] = arr[i - 1];
@whoo24
whoo24 / recursive_linked_list.cpp
Created April 8, 2013 02:44
재귀를 이용해 링크드 리스트 출력하기 print linked list using recursive
#include <list>
#include <algorithm>
using namespace std;
void printlist(list<int>::iterator iter, list<int>::iterator& end)
{
if( iter == end)
return;