V2
Last updated
Was this helpful?
Last updated
Was this helpful?
1-6:C++基础题。
7-9:编程题
7:cut the sticks。用hash map统计有多少种不同的数就可以了。
8:split pixels。给一个24位字符串,每8位代表一个颜色。给了几个颜色,求与其最接近的颜色。如何一样接近,返回ambiguous.
9:is a binary tree valid. 给出一堆边,叫你判断是不是合法的二叉树。题目定义了几种错误的类型。比如重复边,形成环。。