#include <bits/stdc++.h> using namespace std; struct node{ int data; struct node* left; struct node* right; node(int val) { data=val; left=right=NULL; } }; int main() { struct node* root=new node(1); root->left=new node(5); root->right=new node(8); root->left->right=new node(9); cout<<root->left->right->data; return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter