Data Structures PJ2
- 최초 등록일
- 2012.12.01
- 최종 저작일
- 2011.05
- 11페이지/
한컴오피스
- 가격 3,000원
![할인쿠폰받기](/images/v4/document/ico_det_coupon.gif)
소개글
연세대학교 데이타구조 플젝입니다. 만점받았습니다
목차
(1) Brief explanation of the problem
(2) Your view as to how it ties in with what we covered in class
(3) Discussion of your result
(4) Short explanation of your code
(5) Your code
본문내용
(1) Brief explanation of the problem
The goal of this project is to design a hashed dictionary with trying to find an optimum hash function and table size. And implement code to go through the word puzzle and find the words. Also I should consider pros and cons of hashing and trees. So I may compare between hashing and trees.
(2) Your view as to how it ties in with what we covered in class
The most what we covered in class is hash. Hash is mapping of key into some number or word between 0 and tablesize-1. What we consider in hash is that hash should be simple to compute and ensure that any two distinct keys get different cells or at least distributes keys evenly among the cells. And if you use prime number, the implementation can be easier. Also hash can control a data very fast. The running time may be almost constant because the hash may only do input , find, delete or insert.
<중 략>
b=3;
c=0;
for(b=1;b>=0;b--){
if(b==1) word[0]=Puzzle[b+a][b];
else word[1-b]=Puzzle[b+a][b];
current=find(word,h);
if(h->thelist[current].b==1){
for(c=0;c<12;c++){
if(strcmp(word,Dictionary[c])==0) printf("startpoint(%d,%d) Leftup word=%s \n",1,1,h->thelist[current].wordd);
}
}
}
d=0;
for(d=0;d<5;d++){
word[d]=`\0`;
}
}
//(0,3)f부터시작혀여 오른쪽위(대각선)로이동하면서단어를찾는함수
a=3;
b,c=0;
for(a=3,b=0;a>=0,b<4;a--,b++){
if(b==0) word[0]=Puzzle[a][b];
else word[b]=Puzzle[a][b];
참고 자료
없음