Leetcode 800. Similar RGB Color
Given a full 6-digit hex color like "#ABCDEF", find the closest "shorthand" color of the form "#XYZ" (which expands to "#XXYYZZ") by minimizing RGB distance; the optimal solution picks for each 2-digit channel the nearest repeated hex digit value (0x00,0x11, …, 0xFF) independently.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.