- 博客(54)
- 收藏
- 关注
转载 从ctr预估问题看看f(x)设计—DNN篇
在知乎看到一篇dnn做ctr的总结,挺不错的。腾讯大大写的。转载一下。 原文链接: https://zhuanlan.zhihu.com/p/28202287?utm_source=wechat_session&utm_medium=social&from=timeline&isappinstalled=0
2017-08-27 17:42:19
352
原创 学会使用Linux命令行做简单的数据分析
sort sort [-fbMnrtuk] [file or stdin] 选项与参数: -f :忽略大小写的差异,例如 A 与 a 视为编码相同; -b :忽略最前面的空格符部分; -M :以月份的名字来排序,例如 JAN, DEC 等等的排序方法; -n :使用『纯数字』进行排序(默认是以文字型态来排序的); -r :反向排序; -u :就是 uniq ,相同的数据
2017-07-12 11:38:58
702
原创 《算法概论》第八章课后题
8.12 k-生成树问题是这样的: 输入:无向图G=(V,E) 输出:G的一个生成树,其中所有节点度数不超过k——如果该树存在。 请证明对任意k>=2: (a)k-生成树问题是一个搜索问题。 (b)k-生成树问题是NP-完全的。答案: (a)显然k -SPANNING TREE 问题是可在多项式时间内验证的,因此是搜索问题。 (b)若k = 2 ,此时的 2 -SPANNING T
2017-07-05 16:24:36
379
原创 第一届腾讯社招广告大赛总结
大赛介绍计算广告是互联网最重要的商业模式之一,广告投放效果通常通过曝光、点击和转化各环节来衡量,大多数广告系统受广告效果数据回流的限制只能通过曝光或点击作为投放效果的衡量标准开展优化。腾讯社交广告(http://ads.tencent.com)发挥特有的用户识别和转化跟踪数据能力,帮助广告主跟踪广告投放后的转化效果,基于广告转化数据训练转化率预估模型(pCVR,Predicted Conversio
2017-06-28 22:25:30
1856
原创 198. House Robber && 213. House Robber II
问题描述 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent
2017-05-06 23:51:50
377
原创 2017腾讯基础研究岗位面试经历
时隔两年又一次面试腾讯。大三的时候面试的是微信后台的岗位,如今面试的是基础研究的岗位。岗位不太一样,不过初面的时候考的内容还是有点类似的。online 笔试 在线笔试考的基本都是数学题,选择题都是跟一些跟统计相关的数学,简单的如求平均数之类的,这些个人感觉基本不用复习,纯粹提前准备好计算器就好了。比较困难的是一些线性代数相关的题目,大概本人学习线性代数的年代太久远了。。。主要是行列式,特征向量
2017-04-18 00:57:09
4309
原创 300. Longest Increasing Subsequence
问题描述 Given an unsorted array of integers, find the length of longest increasing subsequence.For example, Given [10, 9, 2, 5, 3, 7, 101, 18], The longest increasing subsequence is [2, 3, 7, 101], th
2017-04-16 16:17:40
250
原创 150. Evaluate Reverse Polish Notation
问题描述 Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples:["2", "1", "+", "3", "
2017-04-09 22:33:48
200
原创 316. Remove Duplicate Letters
问题描述 Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your result is the smallest in lexicographical o
2017-04-03 00:39:35
226
原创 文章标题
问题描述 Given a binary tree, return the postorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3},1\ 2/3return [3,2,1].解决思路 其实后序遍历可以转换成前序遍历:先遍历根节点,然后遍历右子树,然后遍历左子树,然后得到的结果反
2017-04-02 16:41:59
214
原创 142. Linked List Cycle II
问题描述 Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list.Follow up: Can you solve it without using extra space?解决思路
2017-03-26 20:22:09
244
原创 141. Linked List Cycle
问题描述 Given a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using extra space?解决思路 开两个指针,一个每次走一步,一个每次走两步,看它们是否会重合。代码/** * Definition for singly-linked list.
2017-03-26 20:09:35
194
原创 139. Word Break
问题描述 Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words. You may
2017-03-26 20:07:03
208
原创 137. Single Number II
问题描述 Given an array of integers, every element appears three times except for one, which appears exactly once. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could
2017-03-26 20:01:13
328
原创 399. Evaluate Division
1.问题描述 Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the answers. If the
2017-03-19 21:18:50
222
原创 136. Single Number
问题描述 Given an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could you implement it without using e
2017-03-12 01:35:04
242
原创 135. Candy
问题描述 There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at least one c
2017-03-12 01:31:16
215
原创 134. Gas Station
问题描述 There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to i
2017-03-12 01:21:14
201
原创 133. Clone Graph
问题描述 Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.解决思路 深度搜索,广度搜索进行复制都可以。。。关键是用一个map记录哪些节点遍历过,已经有对应关系了。代码/** * Definition for undirected graph.
2017-03-12 01:14:24
208
原创 132. Palindrome Partitioning II
问题描述 Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.For example, given s = “aab”, Return 1
2017-03-12 01:11:03
231
原创 131. Palindrome Partitioning
问题描述 Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example, given s = “aab”, Return[["aa","b"],["a","
2017-03-09 00:40:56
253
原创 130. Surrounded Regions
问题描述 Given a 2D board containing ‘X’ and ‘O’ (the letter O), capture all regions surrounded by ‘X’.A region is captured by flipping all ‘O’s into ‘X’s in that surrounded region.For example,X X X XX O
2017-03-09 00:26:52
202
原创 127. Word Ladder
问题描述 Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to endWord, such that:Only one letter can be changed at a
2017-03-09 00:19:49
237
原创 124. Binary Tree Maximum Path Sum
问题描述 Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The
2017-03-05 16:12:03
211
原创 123. Best Time to Buy and Sell Stock III
问题描述 Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete at most two transactions.Note: You may not
2017-03-05 16:07:07
182
原创 121. Best Time to Buy and Sell Stock
问题描述 Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stoc
2017-03-05 16:03:24
512
原创 117. Populating Next Right Pointers in Each Node II
问题描述 Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original string by deleting some (can be no
2017-03-04 02:43:24
214
原创 115. Distinct Subsequences
问题描述 Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original string by deleting some (can be no
2017-03-04 02:35:57
167
原创 50. Pow(x, n)
问题描述 Implement pow(x, n).解决思路 快速幂,但要考虑n为负数的情况。代码class Solution {public: double myPow(double x, long long n) { if (fabs(x) < 0.000001) return 0; else if (fabs(x-1)
2017-03-04 02:29:32
473
原创 105. Construct Binary Tree from Preorder and Inorder Traversal
问题描述 Given preorder and inorder traversal of a tree, construct the binary tree.Note: You may assume that duplicates do not exist in the tree.解决思路 利用递归建树的思想,找到左右子树的list,然后递归下去,就可以了。代码/** * Defin
2017-02-28 22:47:37
197
原创 103. Binary Tree Zigzag Level Order Traversal
问题描述 Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate between).For example: Given binary
2017-02-28 22:45:12
203
原创 文章标题
问题描述 Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).For example: Given binary tree [3,9,20,null,null,15,7], 3/ \9 20 / \
2017-02-28 22:37:17
175
原创 99. Recover Binary Search Tree
问题描述 wo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note: A solution using O(n) space is pretty straight forward. Could you devise a
2017-02-28 22:32:22
172
原创 98. Validate Binary Search Tree
问题描述 Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys less than the node’s key. The
2017-02-28 22:27:07
228
原创 97. Interleaving String
问题描述 Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example, Given: s1 = “aabcc”, s2 = “dbbca”,When s3 = “aadbbcbcac”, return true. When s3 = “aadbbbaccc”, return
2017-02-28 22:16:36
178
原创 95. Unique Binary Search Trees II
问题描述 Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1…n.For example, Given n = 3, your program should return all 5 unique BST’s shown below.1
2017-02-26 23:54:35
211
原创 文章标题
问题描述 Given a binary tree, return the inorder traversal of its nodes’ values.For example: Given binary tree [1,null,2,3],1\ 2/3return [1,3,2].Note: Recursive solution is trivial, could you do it i
2017-02-26 23:48:08
252
原创 93. Restore IP Addresses
问题描述 Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example: Given “25525511135”,return [“255.255.11.135”, “255.255.111.35”]. (Order doe
2017-02-26 23:28:21
225
原创 92. Reverse Linked List II
问题描述 Reverse a linked list from position m to n. Do it in-place and in one-pass.For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note: Given m, n satisfy the follo
2017-02-26 23:08:45
298
原创 91. Decode Ways
问题描述 A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the total numbe
2017-02-26 23:03:25
154
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人