โ† Samsung questions
CodingReported in a candidate post, Sep 2020

Highest value of gcd(x,k) in a binary tree

Filed under Samsung

The question

Given the root node of a pointer-based binary tree and a number k, find the highest value of gcd(x,k) where x is the value of any node in the tree.

No write-up yet. Related questions below have one.

Related Samsung questions

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