Reverse Binary Tree (2B version)

Run Settings
LanguageC
Language Version
Run Command
#include <stdio.h> struct Node { struct Node *left; int data; struct Node *right; }; struct Deno { struct Deno *right; int data; struct Deno *left; }; void print(struct Deno *r) { if (!r) return; print(r->left); printf("%d\n", r->data); print(r->right); } int main(void) { struct Node left = { NULL, 0, NULL }; struct Node right = { NULL, 2, NULL }; struct Node root = { &left, 1, &right }; // 0 -- 1 -- 2 print((struct Deno*)&root); // 2 1 0 }
Editor Settings
Theme
Key bindings
Full width
Lines