<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" and ...
分类:
其他好文 时间:
2020-05-10 17:11:43
阅读次数:
52
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" ...
分类:
其他好文 时间:
2020-05-10 17:03:12
阅读次数:
54
知识点: 1、在垂直布局中,我们可以指定 layout_weight的大小,来平均分配view占据的屏幕大小,这时候要把height设置为0dp(水平的设置宽度为0) 2、gravity控制子视图的显示位置 <EditText android:layout_width="match_parent" ...
分类:
其他好文 时间:
2020-05-10 16:40:52
阅读次数:
71
莫比乌斯: 百度的下一代query-ad匹配算法 本文介绍的内容来自于百度在KDD2019上的论文[1]. 众所周知,百度、头条乃至于Google、Facebook的主要营收点在广告。广告业务的成败关系着众多互联网公司的生死。 由于广告存量的巨大,目前的需求是平均每次query需要从上亿的广告中筛选 ...
分类:
编程语言 时间:
2020-05-10 15:17:35
阅读次数:
90
122th 买卖股票的最佳时机 II 游标思想 定义:index为判断游标,valley表示波谷点,peak表示波峰点。 例如对于数据[7, 1, 5, 3, 6, 4],第一个波谷 波峰为1 5,第二个波谷波峰为3 6。 显然,1 5的差为4,3 6的查为3,它们的和为7,而1 6的和仅为5。 根 ...
分类:
其他好文 时间:
2020-05-10 15:03:32
阅读次数:
55
题目: 解答: 1 class Solution { 2 public: 3 int reverse_string(string& s, int start, int end) 4 { 5 for (int i = start; i <= (start + end) / 2; i++) 6 { 7 ...
分类:
其他好文 时间:
2020-05-09 21:44:58
阅读次数:
67
题目: 解答: 1 class MaxQueue { 2 queue<int> q; 3 deque<int> d; 4 public: 5 MaxQueue() { 6 } 7 8 int max_value() 9 { 10 if (d.empty()) 11 return -1; 12 ret ...
分类:
其他好文 时间:
2020-05-09 21:39:21
阅读次数:
57
题目: 解答: 1 class Solution { 2 public: 3 vector<vector<int>> findContinuousSequence(int target) 4 { 5 int i = 1; // 滑动窗口的左边界 6 int j = 1; // 滑动窗口的右边界 7 ...
分类:
其他好文 时间:
2020-05-09 21:30:07
阅读次数:
59
题目: 解答: 1 class Solution { 2 public: 3 string reverseLeftWords(string s, int n) 4 { 5 reversestr(s, 0, n); 6 reversestr(s, n, s.size()); 7 reversestr( ...
分类:
其他好文 时间:
2020-05-09 21:07:44
阅读次数:
52
"题目" 现在变了,数列是拍好序的,题目要求对数效率,因为x只可能有一个那就二分咯 ...
分类:
其他好文 时间:
2020-05-09 17:08:50
阅读次数:
39