  The zeroth-order general Randi\'c index (usually denoted by $R_{\alpha}^{0}$)
and variable sum exdeg index (denoted by $SEI_{a}$) of a graph $G$ are defined
as $R_{\alpha}^{0}(G)= \sum_{v\in V(G)} (d_{v})^{\alpha}$ and $SEI_{a}(G)=
\sum_{v\in V(G)}d_{v}a^{d_{v}}$ where $d_{v}$ is degree of the vertex $v\in
V(G)$, $a$ is a positive real number different from 1 and $\alpha$ is a real
number other than $0$ and $1$. A segment of a tree is a path $P$, whose
terminal vertices are branching or pendent, and all non-terminal vertices (if
exist) of $P$ have degree 2. For $n\ge6$, let $\mathbb{PT}_{n,n_1}$,
$\mathbb{ST}_{n,k}$, $\mathbb{BT}_{n,b}$ be the collections of all $n$-vertex
trees having $n_1$ pendent vertices, $k$ segments, $b$ branching vertices,
respectively. In this paper, all the trees with extremum (maximum and minimum)
zeroth-order general Randi\'c index and variable sum exdeg index are determined
from the collections $\mathbb{PT}_{n,n_1}$, $\mathbb{ST}_{n,k}$,
$\mathbb{BT}_{n,b}$. The obtained extremal trees for the collection
$\mathbb{ST}_{n,k}$ are also extremal trees for the collection of all
$n$-vertex trees having fixed number of vertices with degree 2 (because it is
already known that the number of segments of a tree $T$ can be determined from
the number of vertices of $T$ with degree 2 and vise versa).
