← Barclays questions
CodingReported in a candidate post, Aug 2023

Maximum height of a divisor tree

Filed under Barclays

A tree has root N. Each node branches to its divisors other than 1 and the node itself. Find the maximum height of the tree, counted in edges. For N = 8 the answer is 2 (8, 4, 2).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Barclays questions

Collected from public candidate posts and coding forums. Updated Nov 2026.