/* Binary_heap_for_kruskal.h -- binary heap file */ # include "new_adjacenty_list.h" /* data type definition */ typedef struct edge { int v_hash_value; int w_hash_value; int weight; } edge; typedef struct binary_heap { edge * heap; int
At first, we chose to use the ADT operation to allocate storage space. later I found that. in this way, there are so many problems that no analysis results will be produced after the analysis. simply go straight to the problem. My thoughts are good,
/* Binary_heap_for_kruskal.c -- binary heap implementation file */ # include # include # include "binary_heap_for_kruskal.h" /* local function declaration */ static int percolate_up (const binary_heap * const PBH, const int index); static int
/* New_adjacenty_list.c -- Name of the adjacent table */ # include # include # include "new_adjacenty_list.h" /* local function declaration */ static adjoin_to_vertex * make_adjoin_to_vertex (const hash_table * const PHT, const name, const int
I was writing the Kruskal algorithm and thought that I should not be too overdrawn. After all, the young capital would easily be squandered. Yesterday I did not take off my clothes and slept all night.
It will take up to 5.30 days, and it will be a
The second day of Chapter 8 is not difficult to implement.
This is mainly a collection that represents non-intersecting sets. It can combine known sets to determine the set where an element is located. programming costs are low. the problems
/* Disjiont_set.c -- Non-intersecting set implementation file */ # include # include # include "disjiont_set.h" /* interface function definition */ int initialize_d (disjiont D, const int capacity) { int I; If (capacity return 0; d [0] =
Invert an adjacent table without considering the weight. It is a function serving another routine. paste it.
Int reverse_a (adjacenty_list * const padj, const hash_table * const Pht) { name; adjoin_to_vertex * scan, * new_vertex, * temp_1, ** temp_
/* Adjacenty_list.c -- Name of the adjacent table */ # include # include # include "adjacenty_list.h" /* local function declaration */ vertex * make_vertex (const name vertex); /* interface function definition */ int createadjacent_list
It is used to simulate the number of conflicts between two hashes by linear detection, square detection, and hash.
The size of a random sequence can be specified to generate a random sequence repeatedly. you can specify the table size and change the
This ensures that the depth of the tree is very low, and the number of rotations is very small. AVL trees of the same type have greatly improved. But it is not easy to implement.
Okay, let's continue with my habits. The Code explains the problem.
/*
After several days, the Code finally appeared today.
It is much easier to stretch the tree from top to bottom than the one written last year.
I understand what people have summarized. It is very difficult for me to write it myself.
Some tips for
In other words, I wrote this thing for more than four days. I wrote it for 10 hours today and finally finished it. I feel a lot of feelings .!
The new data structure needs to be used in combination with the previous data structure. I designed it
The Euler loop is written out, and it is natural that Euler's traveling around will be done with some more conditional checks. I can only say that I have fully prepared for this implementation.
/* 9-32 (B)-12-31-12.37.c -- Chapter 9, question 1 */ #
I haven't written any code for a long time.
This is an exercise in the book. Starting from this code, it means that the crazy encoding in this chapter has started...
Recently, some slashes and some distractions...
Niang's job is suspended! Tragedy!
/* Extendible_hashing.c -- the file that can be expanded into columns */ # include # include # include "extendible_hashing.h" /* local function declaration */ static char pow_base_two (const int power); /* interface function definition */
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service