Quick Sort:
Viod qsort (int*tab, int left, int right)
If (left<right)
Int m= left;
If (tab[i]<tab[left])
Zamiana (tab[++m], tab[i]);
Zamiana (tab[left], tam[m]);
Qsort (tab, left, m);
Qsort (tab, m+1, right);
Push (s, x):
Void Push (node*head, x)
{node*pom= head;
While (pom->next=NULL)
{pom=pom->next;}
Pom->next= new node;
Pom->next->val=x;
Pom->next->next= NULL;}
Pop (s):
Void Pop (node*head)
{node*pom=head;
While (pom->next!=NULL)
{pom=pom->next;}
Pom=NULL;}
Naiwny:
While (i<=n-m+1)
Begin j:=0
While ((wzozec[j+1]= tekst[i+j] and (j<m)
Do j:= j+1;
End
Hashowanie:
H(x,i) = (x(x,i)+3i)mod y
Dla h(x,i)= x mod y
Insert:
Insert (el:x, poz:p, list:L)
A<- first (L)
While (a różne p) a<-next(a,l)
Insert x;
Locate:
Pozycja Locate (el:x, List:L)
A<- first (L)
While (retrieve (a,L) rózne x)
A<-next (a,L)
Return a;
Delete:
Delete (poz:p, List: L)
While (p różne b)
L[p]<- L[p+1]
P<- next (p,L)
B=b+1
Previous:
Pozycja previous (poz:p, List: L)
A<- first (L)
While (next (a,L) różne p)
A<- next (a,L)
Return a;
Init:
Init (list: L)
A<- 0;
B<- -1;
Pusta Lista:
New (p)
P<- NULL;