家中小猫照求bless,比原来胖了不少的cc和豆豆# pets - 心有所宠
q*x
1 楼
4. Design a timing mechanism: when a packet is received, cancel the
timing;
otherwise, start timing until time out. Suppose each timing object has
different expiration period?
没看懂。
5. Given an integer, print out its square root
返回整数根?是最接近,还是小于且最接近?
6. An integer array of size m + 1 with m unique element, find the
duplicate
one
排序和散列两个方法,没更好的吧?
7. Given a function to read/write data from/to hard disk. Req(r/w, addr,
size, buffer), e.g.Read_write(read, 0, 5, …), Read_write(read, 5, 3, …).
This function will be called thousand times. Consolidate the I/O
requests
and printout to one.
“read command, start from address 0, access 8 sectors.”
没看懂。
11. Two integers n & m represented as two arrays, return n*m in terms of
one
array
没看懂。
17. Describe a data structure to store a tree node, if a tree node has a
pointer to the sibling, write a function to update the sibling (level-
order
traverse)
啥是sibling?同一个节点的左右子节点,还是同层的都算?如果是后者,指针指向哪边的?
24. runlength encoded: [number of next elem in the array, the value of
the
elem]
2, 1, 3, 6, 1, 9 => 1, 1, 6, 6, 6, 9
Create a class and implement the following two methods:
getNext()
hasNext()
没看懂。
26. Suppose we can compare two arrays like:
{4,2,3} > {3,5,6}
{4,2,3} < {4,3,0}
In each move, you can only swap a number with its neighbor. Given an
array
and a number n, design an algorithm to make this array minimum using n
moves.
没看懂。
timing;
otherwise, start timing until time out. Suppose each timing object has
different expiration period?
没看懂。
5. Given an integer, print out its square root
返回整数根?是最接近,还是小于且最接近?
6. An integer array of size m + 1 with m unique element, find the
duplicate
one
排序和散列两个方法,没更好的吧?
7. Given a function to read/write data from/to hard disk. Req(r/w, addr,
size, buffer), e.g.Read_write(read, 0, 5, …), Read_write(read, 5, 3, …).
This function will be called thousand times. Consolidate the I/O
requests
and printout to one.
“read command, start from address 0, access 8 sectors.”
没看懂。
11. Two integers n & m represented as two arrays, return n*m in terms of
one
array
没看懂。
17. Describe a data structure to store a tree node, if a tree node has a
pointer to the sibling, write a function to update the sibling (level-
order
traverse)
啥是sibling?同一个节点的左右子节点,还是同层的都算?如果是后者,指针指向哪边的?
24. runlength encoded: [number of next elem in the array, the value of
the
elem]
2, 1, 3, 6, 1, 9 => 1, 1, 6, 6, 6, 9
Create a class and implement the following two methods:
getNext()
hasNext()
没看懂。
26. Suppose we can compare two arrays like:
{4,2,3} > {3,5,6}
{4,2,3} < {4,3,0}
In each move, you can only swap a number with its neighbor. Given an
array
and a number n, design an algorithm to make this array minimum using n
moves.
没看懂。