C language of the binary heap file combined with the Kruskal Algorithm

/* 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

Partial path compression. Partial path compression C Language

Unlike path compression, partial path compression makes the nodes on the access path move up. /* 8-14-12-03-00.30.c -- Chapter 8, question 1 */ settype find (disjiontset gather, const item ); settype find (disjiontset gather, const item) {

Non-intersection ADT implementation file C Language

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 implementation file C language with the Kruskal Algorithm

/* 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

The model generated by the adjacent table is implemented in C language.

/* 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

Minimum Spanning Tree prim algorithm C Language

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

Minimum Spanning Tree (Kruskal) algorithm C Language

/* 9-18 (B)-12-19-00.49.c -- Chapter 9, question 1 */ # include # include # include "binary_heap_for_kruskal.h" # include "disjiont_set.h" # define size (10) int main (void); void Kruskal (const adjacenty_list * const padj, const

C language for Stack header files

/* Stack_adt.h -- stack model header file */ /* data type definition */ typedef char name; typedef struct stack_node { name; struct stack_node * Next; } stack_node; typedef stack_node * stack; /* interface function declaration */ /* operation:

Non-overlapping ADT header file C Language

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

Use the Kruskal algorithm to implement the C language for non-intersecting sets of Files

/* 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 C Language

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_

Read the graph into the adjacent table to implement the C language of the file

/* 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

Hashed conflict count test C Language

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

Red/black tree implementation file C Language

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. /*

C language for top-down tree header files

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

Minimum path for single-node authorization C Language

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

Hash header file C language in combination with Dijkstra Algorithm

/* Hash. H -- hash header file */ Enum kindofentry {legitimate, empty, deleted}; # define prime (7) # define failed (-2) # define NUL ('/0') # define false (0) # define true (1) /* data type definition */ typedef char name; typedef struct

Euler's traveling algorithm C Language

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 */ #

C language for solving the maximum number of completions and task sequence

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!

Columns that can be expanded-C language for files

/* 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 */

Total Pages: 5902 1 .... 4261 4262 4263 4264 4265 .... 5902 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.