Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
|
Union find algorithm. More...
#include <stdio.h>
#include <stdlib.h>
Macros | |
#define | MAX_SIZE 1000 |
maximum number of elements in the set | |
Functions | |
int | find (int *p, int x) |
Find index of or value in an array. More... | |
void | join (int *p, int x, int y) |
Function to join. More... | |
int | main () |
Main function. | |
Union find algorithm.
int find | ( | int * | p, |
int | x | ||
) |
Find index of or value in an array.
[in,out] | p | array to search and update |
x | value to search |
x