Insert sort C Language

finally, I started to get started with sorting. The implementation is understandable. It is difficult for me to analyze the complexity. /* 7-1-11-19-0020.1.c -- Chapter 7 First Question */ # include # include # define size 9 typedef int item;

Skip header file C Language

RecentCodeThe low output makes me feel guilty! When I get home, I always want to go to bed, and I feel very tired. It is also true that I am tired recently. It may also be because I always think that I will get tired... Adjustments and adjustments

C language for non-recursive Merge Sorting

It was written at 03:27 a.m., but it was not written. I woke up and wrote it. the main problem is that when the array size is not the power of 2, the right_end is out of the range. my logic was originally complicated, and then I re-organized the

Analog board layout header file C ++

// Block. H -- simulate the integrated circuit board header file # include # include "intervaltree. H " namespace block { using tree: item; using tree: node; using tree: intervaltree; typedef struct block { item xmin, xmax, ymin, Ymax; int

Two queues implement file C Language

/* Binomial-queue.c-two queue implementation files */ # include "binomial-queue.h" /* local function declaration */ > static subtree combine_trees (subtree T1, subtree T2); static node * make_node (const item); static void recursively (const

Heap sorting C Language

/* 7-11-11-19-22.12.c -- Chapter 7, 11th */ # include # include # define leftchild (position) * 2 + 1) /* notice the space */ # define size 12 int main (void ); void print_array (const int * const array, const int size); void heap_sort (int

The lowest access cost of the Binary Search Tree. C Language

Dynamic Planning Algorithm. Calculate the minimum access cost after the current Binary Search Tree is constructed into the optimal binary search tree. although I have not written a routine to generate the optimal binary search tree, I am very happy.

Random number generator C Language

I have read 90% of the mathematical analysis, but I have not studied it in depth. This code is copied, and the core part is copied. It feels good. Generate a fixed random number sequence, as long as the seeds are the same. This random number

Search for the K Maximum/minimum meta C language in the stretch tree

I thought it was very simple, but I accidentally did it for five hours. Fortunately, I got it. I will not talk about it much, but I will post the code, which is very clear. Node * findkthmin_s (const splaytree * const PST, int K) { node * scan;

K-D tree implementation file C Language

/* K-dTree.c -- k-D tree implementation file */ # include "k-dTree.h" /* local function declaration */ /* queue */ static queuenode * makenode_q (node * const Pn, const int index); /* k-D tree part */ static node * makenode_k (const item * const

Compare various packaging testing methods header file C Language

My God! If no code is available, I am crazy .!!! Fortunately, after so long, the Code finally came out. Every time I write, I tell myself. I have to write some strong words after writing this ,.... as a result, no. basically... after writing it, I

C language for Binary heap file with Dijkstra Algorithm

/* Binary_heap.h -- binary heap file */ # include "new_adjacenty_list.h" /* data type definition */ typedef vertex * heap_item; typedef struct binary_heap { heap_item * heap; int capacity; int current; }* binary_heap; /* interface function

Compare various packaging testing methods to implement the C language of the file

/* 10-5-11-1-11-21.47.c -- Chapter 10 Fifth Question */ # include "uiversal_queue.h" typestrudef CT data { int time; int count; } data; int main (void); int showmenuandgetchoice (void ); void eatline (void); int getinput (int * const input,

O (nlgk) problem priority queue implementation file C Language

/* Priorityqueue. C -- Minimum heap implementation file */ # include "priorityqueue. H " /* local function declaration */ static bool percolateup_p (prioritynode * const heap, const int position, const int size); static bool percolatedown_p

2-D tree implementation file C Language

/* 2dtree. C -- 2-D tree implementation file */ # include "2dtree. H " /* local function declaration */ /* queue part */ static queuenode * makenode_q (node * const Pn, const int index); /* 2-D tree part */ static node * makenode_t (const item *

Queue header file C Language

/* Uiversal_queue.h -- queue header file */ # include "head. H " /* define data type */ typedef struct node { item; struct node * Next; } node; typedef struct queue { node * front; node * rear; int current; } * queue; /* proclaim interface

Skip table implementation file C Language

Wish yourself a happy Valentine's Day. Today is July 22, lunar January 15. I studied the rebuilding of toll roads at home for a day. It is shameful that it is not correct yet. However, we found that there was a problem with the original skip table.

Find the strongly connected branch C ++ in a directed acyclic graph

Said that I had been in touch with this thing six months ago. I contacted again yesterday and found that the method provided in the book is very good. go to DFS and follow the completion time, that is, run the DFS command again on the transformed

The binary search tree is converted into a two-way linked list C ++

I haven't studied it for several days . to be honest, it's quite uncomfortable. I like algorithm issues very much and then write code. it is easy to write. besides, this is very important to me.I don't have that much time to repeat it. at least now.

Generic queue header file C ++

//queue.h#ifndef QUEUE_H_#define QUEUE_H_#include templateclass Queue ;templatestd ::ostream & operator & queue){os * scan = queue.m_head ;while (scan != NULL){os m_item m_next ;}os " ;return os ;}templatestd ::istream & operator >> (std ::istream

Total Pages: 5902 1 .... 5044 5045 5046 5047 5048 .... 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.