01 2020 档案

摘要:一、遇到undefined symbol怎么办: (1)首先解析未定义符号是什么:【利用c++filt命令】 c++filt _ZN4Json5ValueixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE (2)查看是否两个动态库的编译 阅读全文
posted @ 2020-01-16 15:40 chiwin 阅读(543) 评论(0) 推荐(0)
摘要:给定二叉搜索树的根结点 root,返回 L 和 R(含)之间的所有结点的值的和。【输出值在LR之间的所有值的合】 二叉搜索树保证具有唯一的值。 示例 1: 输入:root = [10,5,15,3,7,null,18], L = 7, R = 15输出:32示例 2: 输入:root = [10,5 阅读全文
posted @ 2020-01-11 17:39 chiwin 阅读(126) 评论(0) 推荐(0)
摘要:class Solution { public: string toHexspeak(string num) { stringstream ss; long long inter; //转16进制 string hexret; ss << num; ss >> inter; ss.clear(); 阅读全文
posted @ 2020-01-09 21:54 chiwin 阅读(295) 评论(0) 推荐(0)
摘要:为什么三次握手: 让服务端和客户端都知道,自己的收信能力和发信能力没有问题; 第一次:客户端发给服务端--服务端知道了,自己的收信能力和客户端的发信能力没有问题; 第二次:服务端回复客户端--客户端知道了,自己的发信能力和收信能力没有问题,不然不会收到服务端的回信;服务端发信能力和收信能力没问题,不 阅读全文
posted @ 2020-01-03 16:44 chiwin 阅读(105) 评论(0) 推荐(0)
摘要:符号类型 说明 A 该符号的值是绝对的,在以后的链接过程中,不允许进行改变。这样的符号值,常常出现在中断向量表中,例如用符号来表示各个中断向量函数在中断向量表中的位置。 B 该符号的值出现在非初始化数据段(bss)中。例如,在一个文件中定义全局static int test。则该符号test的类型为 阅读全文
posted @ 2020-01-03 14:40 chiwin 阅读(353) 评论(0) 推荐(0)
摘要:/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solu 阅读全文
posted @ 2020-01-02 22:12 chiwin 阅读(104) 评论(0) 推荐(0)
摘要:class Solution { public: string gethead(string str){//获取头单词 string ret = ""; int strlen = str.length(); for(int i = 0; i < strlen; ++i){ if(str[i] == 阅读全文
posted @ 2020-01-02 20:42 chiwin 阅读(274) 评论(0) 推荐(0)
摘要:C++: class Solution { public: int missingNumber(vector<int>& arr) { int subnum = abs(arr[1]-arr[0]) < abs(arr[2]-arr[1]) ? arr[1]-arr[0] : arr[2]-arr[ 阅读全文
posted @ 2020-01-02 17:38 chiwin 阅读(311) 评论(0) 推荐(0)