Build A Binary Tree Using PreOrder Implementation [C++] - Query

how does this code traverse through the preorder array