Description
Metadata
Settings
owl:sameAs
Inference Rule:
b3s
b3sifp
facets
http://www.w3.org/2002/07/owl#
ldp
oplweb
skos-trans
virtrdf-label
None
About:
dbkwik:resource/WX9X8eoTWXHiOYBKjpMQFQ==
Sponge
Permalink
An Entity of Type :
owl:Thing
, within Data Space :
134.155.108.49:8890
associated with source
dataset(s)
Attributes
Values
rdfs:label
Hashing-Beispiel
rdfs:comment
habs nur mal abgetippt. noch nicht auf funktion getestet. #include #include #include #define HASHSIZE 11 #define NULL 0 struct NODE { int key; char name[31]; NODE* pNext; }; void Einfuegen(NODE* pNeu); NODE* Suchen(int key); int Loeschen(int key); NODE* hashtable[HASHSIZE]={0}; //Vorne Einfügen void Einfuegen(NODE* pNeu) { int hashval = pNeu->key % HASHSIZE; pNeu->pNext=hashtable[hashval]; hashtable[hashval]=pNeu; } NODE* Suchen(int key) { int hashval = key % HASHSIZE; NODE* pWork = hashtable[hashval]; while(pWork!=NULL) { if(pWork->key == key) { return pWork; } pWork=pWork->pNext; } return NULL; } int Loeschen(int key) { int hashval = key % HASHSIZE; NODE* pNode = hashtable[hashval]; NODE* pPrev = NULL; while(pNode != NULL) { if(pNode->key == key) { if(pPrev == NULL) { hashtable[hashva
dcterms:subject
dbkwik:resource/ryrcFM6lZrhB5c-1Dmngrg==
abstract
habs nur mal abgetippt. noch nicht auf funktion getestet. #include #include #include #define HASHSIZE 11 #define NULL 0 struct NODE { int key; char name[31]; NODE* pNext; }; void Einfuegen(NODE* pNeu); NODE* Suchen(int key); int Loeschen(int key); NODE* hashtable[HASHSIZE]={0}; //Vorne Einfügen void Einfuegen(NODE* pNeu) { int hashval = pNeu->key % HASHSIZE; pNeu->pNext=hashtable[hashval]; hashtable[hashval]=pNeu; } NODE* Suchen(int key) { int hashval = key % HASHSIZE; NODE* pWork = hashtable[hashval]; while(pWork!=NULL) { if(pWork->key == key) { return pWork; } pWork=pWork->pNext; } return NULL; } int Loeschen(int key) { int hashval = key % HASHSIZE; NODE* pNode = hashtable[hashval]; NODE* pPrev = NULL; while(pNode != NULL) { if(pNode->key == key) { if(pPrev == NULL) { hashtable[hashval] = pNode->pNext; } else { pPrev->pNext = pNode->pNext; } free(pNode); return 1; } pPrev = pNode; pNode = pNode->pNext; } return 0; }
Alternative Linked Data Views:
ODE
Raw Data in:
CXML
|
CSV
| RDF (
N-Triples
N3/Turtle
JSON
XML
) | OData (
Atom
JSON
) | Microdata (
JSON
HTML
) |
JSON-LD
About
OpenLink Virtuoso
version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software