# Questions tagged [trees]

Questions about a special kind of graphs, namely connected and cycle-free ones.

683 questions
Filter by
Sorted by
Tagged with
16 views

### Job Interview Question

Consider the following (Job Interview) question: As a programmer for Zoom company suggest an algorithm that satisfies the following complexity requirements for the given functions: In the following ...
16 views

### Trying to convert algorithm from recursive to iterative

I have this algorithm to sum binary tree branches from leftmost branch to rightmost one, so the solution is an array of sums: ...
32 views

### Recurrence relation $T(n/10) + T(c·n) + n$

Given the following question: $T(n)=T(n/10)+T(an)+n$ while $a$ is a const and $T(n)=1:(n<10)$ Using a set of complicated equations I found and proved that $a=9/10$ is the correct answer (for sure) ...
36 views

24 views

### Computing childrens of ith node of a d-ary tree

Assume that we represent a complete d-ary tree in an array[1,...n] (this is a 1-based array of size n). The formula for indices of children of node no. i is given as: {(1-i)d+2, ... , min{n,(1-i)d+d+1}...