preorder_tree_construction.cpp building with vc
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
struct node {
|
struct node {
|
||||||
@@ -39,7 +40,7 @@ node * prefix_to_tree( const std::vector<double>& v ){
|
|||||||
node * tmp = max_node;
|
node * tmp = max_node;
|
||||||
max_node = max_node->root;
|
max_node = max_node->root;
|
||||||
if ( max_node && tmp == max_node->left ){
|
if ( max_node && tmp == max_node->left ){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -99,4 +100,4 @@ int main( void ) {
|
|||||||
test( {8, 4, 2, 1, 6, 12, 10, 11, 14, 15} );
|
test( {8, 4, 2, 1, 6, 12, 10, 11, 14, 15} );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user