This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<fstream> | |
#include<iterator> | |
#include<algorithm> | |
#include<numeric> | |
#include<vector> | |
#include<string> | |
using namespace std; | |
struct Line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type tree = Node of tree * int * tree | Nil | |
open Printf | |
let rec print_tree t = | |
match t with | |
| Node (left, data, right) -> print_tree left; | |
printf "%d\n" data; | |
print_tree right | |
| Nil -> ();; |