>>107928460
Come on, it's not even that hard.
#include <stdio.h>
#include <stdbool.h>
static int construct_binary_tree(
int result[3000], bool result_valid[3000], size_t result_idx,
const int *preorder, size_t preorder_size, size_t *preorder_idx,
const int *inorder, const int *inorder_end)
{
if (inorder == inorder_end)
return 0;
int node_val = preorder[(*preorder_idx)++];
Comment too long. Click here to view the full text.