第一种方法,利用NLME.h里面定义的专门API获取设备自身IEEE地址/** This function will return a pointer to the device's IEEE 64 bit address** This function resides in nwk_util.c....
分类:
其他好文 时间:
2014-08-03 20:21:55
阅读次数:
351
Give two versions of WA code:
Version 1: Runtime Error: Find the bug
class Solution {
public:
void find(const string& s, const unordered_set& dict, vector& res) {
int i, j, len = s.length();
...
分类:
其他好文 时间:
2014-08-03 15:21:27
阅读次数:
329
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
/**
...
分类:
其他好文 时间:
2014-08-03 12:54:55
阅读次数:
201
Description
You have N integers, A1, A2, ... ,
AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other ...
分类:
其他好文 时间:
2014-08-03 12:53:25
阅读次数:
311
问题:将二叉树的所有结点指向他的右边的一个结点分析:对于每一个结点来说,其操作都是一样的,除了他的左儿子指向右儿子外,其左儿子的全部右后辈均指向其右儿子的全部左后辈/** * Definition for binary tree with next pointer. * struct TreeLin...
分类:
其他好文 时间:
2014-08-03 10:12:05
阅读次数:
178
Description
Each of the M lanes of the Park of Polytechnic University of Bucharest connects two of the N crossroads of the park (labeled from 1 to N). There is no pair of crossroads connected by mo...
分类:
其他好文 时间:
2014-08-02 23:27:14
阅读次数:
327
Big String
Time Limit: 2 Seconds Memory Limit: 65536 KB
We will construct an infinitely long string from two short strings: A = "^__^" (four characters), and B = "T.T" (three characters). R...
分类:
其他好文 时间:
2014-08-02 21:02:04
阅读次数:
291
题目再现
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time
complexity should be O(log (m+n)).
题意解析...
分类:
其他好文 时间:
2014-08-02 18:24:13
阅读次数:
335
问题:有序合并两个有序链表分析:归并排序的合并部分class Solution {public: ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { ListNode *helper=new ListNode(0); ...
分类:
其他好文 时间:
2014-08-02 18:17:03
阅读次数:
170
Description
Gigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance.
It orders two arms of negligible weight and each arm's lengt...
分类:
其他好文 时间:
2014-08-02 15:30:13
阅读次数:
235