Archive for 7월, 2008

Finding a Loop in a Single Linked List

Recently, I had an interview with Rikard Gillemyr, VP Engineering of Opera Software. It was great experience that I talked to someone like him.

While interviewing, he gave me a simple data structure question (It has been a while since I worked on algorithm b/c joining the army, so I would say it was not that easy for me), and it was ‘finding a loop in a single linked list.’

A single linked list is used as a stack. It is made of nodes where each node has a pointer to the next node or null to end the list. If there is a loop between any nodes inside of single linked list, then it might not get to the end node or contain more then two links to some node.

I found a solution (but not efficient), and it was checking the entire list everytime when a node gets to next node. It ends up with O(n^2) time complexity.

He tried to give me some idea so that I can improve this, but I could not. I got mad to myself little bit, so I tried find better solution without looking or googling anything, and I found one.

If we know the first and last node, and then we reverse the list, we can track back from last node to first node. If it does not get to the first node that we started before we reverse the list, then we can say there is a loop in this single linked list. It ends up with O(n) time complexity.

Eventually, I googled this to check whether there is better answer, and I found a website.

Link to http://ostermiller.org/find_loop_singly_linked_list.html

Like I said, it has been two years not working or reviewing on any algorithm stuff, so before I start refreshing my knowledge, this was very good point to start with. I really enjoyed and had fun.

Thank you, Mr.Gillemyr

Finding Nemo

사용자 삽입 이미지

구글로 이것저것 찾다가 무심코 내 이름을 검색어에 넣어보았다.

대학교수님부터 아나운서, 연예인 친구까지 다양한 인물들이 등장하더라.

그러다 한자 세절이 다 똑같은 인물이 엠파스 인물검색으로 검색되어 클릭해서 읽어보게 되었다.

사용자 삽입 이미지

정말 훌륭하신 분이더라… … … … 그냥 올려본다…

One Day After Another

8년동안 묵혀있던 물건들과 옷가지들을 다 꺼내어 정리를 시작했다.

고등학교 아르바이트했던 시절 사진도 나오고 묵혀둔 다이어리에서 현금 3만원도 나오더라…

고등학교 졸업식때 친구들과 찍은 사진 몇장을 발견했는데, 정말 내가 그때 당시 이렇게 생겼었던건가… 생각이 들었다.

이때엔 내가 이랬었지… 이런 녀석들이 있었지… 그 녀석들과 이런것들을 했었지…

스물 여덟이란 아직은 어린 나이에 인생을 되짚어가며 지나온 삶에 대해 논한다면 정말 웃긴 이야기일지 모르지만…

이렇게 지나간 세월 하루하루를 되짚어 볼수있는 기회가 있을 때마다 내 삶 자체가 소중해짐을 느낀다.

그나저나… 벌려놓은건 정리를 다 해야할터인데… (ㅠ_ㅠ)a

2008년 7월 19일 [전역하다-!!!]

대구지역대 본부에 가서 전역증을 받아들고…
 
걸어 나오다 나도모르게 주먹을 불끈 쥐었다…

끝났구나… 휴…

또다른 시작…

준비해야 할 것…

새로운 것…

그리고 약간의 두려움과 기대…

한껏 부푼 마음을 잠시 다잡아 본다…

Category Image Display + 달력 위치 변경

사용자 삽입 이미지

2주남은 군생활을 마무리/복귀하기 위해 기차표 예약을 하고나서 시간이 조금 남기에 심심하기도 해서 스킨수정을 조금 해보았다.

갑자기 이렇게 해보면 어떨까? 라고 생각이 떠오른데다 큰 의미가 없는 보여주기식 이미지 표기이기에 그냥 [##_article_rep_category_##].jpg식으로 바로 읽어들이게 만들었다. 카테고리를 추가할시엔 매번 이미지를 새로 만들어줘야하고 이미지가 미리 저장이 안되어있다면 그냥 깨져나온다는 문제점이… (당연하겠지만…^_^;) 뭐 시간날때 GD써서 간단하게 플러그인으로 제작해봐야겠다…

이전 달력 위치에 Category Image를 간단하게 만들어 그냥 출력해주고  달력을 왼쪽 상단으로 옮겨보았다.

근데… 이전보다 조금 더 나아보이나요…? (+_+)a 긁적긁적…

전역 도움말 기능

사용자 삽입 이미지

오늘 이메일 체크를 하다가 전역 도움말 기능에 관련된 티켓이 날라왔다… 밑도 끝도 없이 말도 안되는 무식한 이야기겠지만… 13일 남은 내 군생활 전역날까지  어떻게라도 조금더 빨리 보낼 수 있는 도움 기능은 없을까 하는 생각이 불현듯… 너무 썰렁한가…? (ㅠ_ㅠ)a

자발적으로 알아서 푸쉬업 50개…