A simulated function aims to find the nearest common ancestor of a pair of nodes. the implementation idea is to map the tree to an array first, and set the value range with the node to root, and the value ranges of other nodes to the parent node
This version is coming soon, but yeah is still running.
The idea is to record all the prefixes of words to reduce the number of scans.
My implementation method is to create a new file to store all the prefixes of all words, and then add the same
writing is very inefficient. This is a lot of details. It seems that every time you write it, you have to find it again. Just write it.
// Binaryheap. CPP -- 2011-08-28-23.06 // purpose: // define methods of Class "binaryheap ". # include "stdafx.
This is something I wrote yesterday. What I really appreciate is that the circular queue is implemented in the same place. It is very clear and has a good idea.
/* 12-34-11-04-05-19.32.c -- Chapter 12th, question 1 */ # include "pairingheap.
What I want to say about this is. about the nullnode node. after calling release () to release the memory, you need to restore it to null for the next continuous use. I think of it, very good.
/* Treap. C -- treap tree implementation file */ #
There is a shadow of the randomization algorithm, so that each node maintains the heap order with the priority value, and then controls the tree height. This is a good idea and easy to implement.
/* Treaptree. H -- treap tree header file */ #
... The latest works are really pitiful.
But fortunately, it is better than not.
This is an example of the divide and conquer algorithm. It is implemented according to the idea. In general, it is not bad. I hope that the next step will be more
This heap sorting uses a new filter function. You cannot analyze the running time for the moment. Let's go back and calculate it, even if it is roughly dependent on the clock timer.
/* 7-40-11-27-23.10.c -- Chapter 7, question 1 */ # include #
// Graphrepresentasadjacentlist. H -- Graph header file. // 2011-08-28-20.26 -- // purpose: // define a class "graphrepresentasadjacentlist ". // declare methods of the class, and define element member. # include # include # include "binaryheap.
I did not write anything for a month, because I spent more energy on C ++. starting from January 1, May 4, it will be a month now. although I have not finished learning, I can write something like a binary search tree.
There are many new features
// Neartree. CPP-implementation file of the kinship tree # include "stdafx. H " # include" neartree. H " namespace tree { // Private: int neartree: m_min (const int, const int B, const int C, const int d) const { int min = A; If (min> B) min =
I used a class template. I don't know if this is an extra step. The exercise is the main one.
//graphRepresentAsAdjacentMatrix.h --graph header file.//Purpose://A graph represent as a adjacent matrix, this graph can't storage //weight value instead
When I got home from work, I had a mouthful of pickles. After reading the books, I went to bed, because it was too sleepy. (T... really hard. Haha)
Woke up at and started to write code ..
I wrote a rough story about a part of an exercise. I finished
On the machine with the small-end method, the two short int types store their lowest valid bytes at the leftmost of their respective starting addresses (hereinafter referred to as the starting address as the address ). it should be noted that,
Call, start learning from December and use C. fortunately, I have learned C and C ++ before and it is not that difficult to learn. there are many features and you are not greedy to master them.
There is nothing for me in the project at the moment. I
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