自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Viking的博客

不积跬步无以至千里 不积小流无以成江海

  • 博客(93)
  • 资源 (4)
  • 收藏
  • 关注

原创 leetcode-hot100-图论

循环遍历,以2为起始位置,开始广度优先遍历,同时将相邻的1元素置为-2,同时包含一个时间变量,随着深度增加而增加;类拓扑排序,记录每个节点的入度、出度,先遍历入度为0的节点,同时其指向的节点的入度减1;判断当前位置是否陆地,是 nums++,同时将所有相邻位置置为-1(深度优先遍历);**输入:numCourses = 2, prerequisites = [[1,0]]学习课程 1 之前,你需要完成课程 0。**输入:grid = [[2,1,1],[1,1,0],[0,1,1]]的新鲜橘子都会腐烂。

2024-03-19 23:45:31 1472

原创 leetcode-hot100-矩阵

输入:matrix = [[1,4,7,11,15],[2,5,8,12,19],[3,6,9,16,22],[10,13,14,17,24],[18,21,23,26,30]], target = 5。定义边界,然后先从左到右,访问结束后,重新定义边界,判断边界是否覆盖,覆盖则结束;**输入:matrix = [[1,1,1],[1,0,1],[1,1,1]]输入:matrix = [[1,2,3],[4,5,6],[7,8,9]]输出:[[1,0,1],[0,0,0],[1,0,1]]

2024-03-12 23:27:03 687

原创 leetcode-hot100-普通数组

当遍历到非第一个元素时,比较res数组的最后一个区间的右边界和当前区间的左边界,如果重合,即res[-1][1] < intervals[i][0], 进行区间合并,将res中最后一个区间的右边界更新为当前元素的右边界;如果不重合,直接加入到结果数组中。dp[i]的计算和dp[i-1], nums[i]有关,也可以把dp数组去掉,使用pre、cur来代替,pre=dp[i-1], cur=dp[i],节省空间。**输入:intervals = [[1,3],[2,6],[8,10],[15,18]]

2024-03-10 23:04:31 732

原创 leetcode-hot100-子串

前缀和类似于数据积分,prefix[i]表示子数组0~i的和,prefix[i] - prefix[j]表示j+1, i之间的和。时,我们知道当前窗口是一个有效的覆盖子串,并尝试通过移动左指针来缩小它的大小。双层循环,i,j表示子数组的左、右边界,遍历所有的子串,判断其和是否等于k。固定窗口,循环遍历,找到所有符合长度条件的子数组,确定子数组内的最大值,保存在结果数组中。另一种方法,采用优先队列/大顶堆,遍历元素,维护长度=k的结构,保存在数组中。的滑动窗口从数组的最左侧移动到数组的最右侧。

2024-02-27 00:03:58 991

原创 leetcode-hot100-滑动窗口

1、“窗口”的右边界一直向右边滑动,直到发现“窗口”内的元素出现了重复,或者右边界超过了字符串的末尾,在右边界扩张的过程中,“滑动窗口”的长度在逐渐增大,此时记录下最大值;lo用来缩小范围,hi用于扩大范围:先固定lo左边界,扩大右边界,寻找可行解,找到之后固定hi,计算窗口内容,然后缩小lo左边界,继续寻找。同时,第二步中,我们可以进一步优化,将left的移动一步到位,直接移动到重复元素的下一位,如”abca“,移动到b上。2、只要出现了“重复”,“窗口”的右边界停止,此时左边界向右边移动,

2024-02-27 00:03:14 365

原创 leetcode-hot100-双指针

外围一层循环,内层循环查找两数之和等于0-nums[i]的数组,如果找到,加入到结果中,同时进行去重操作,将数组中前后等于当前元素的下标都跳过(所以,最先一步是排序,保证相同元素都连续出现,方便后续进行去重操作),这里去重之后,就不用最后对结果去重。解释:上面是由数组 [0,1,0,2,1,0,1,3,2,1,2,1] 表示的高度图,在这种情况下,可以接 6 个单位的雨水(蓝色部分表示雨水)。**输入:height = [0,1,0,2,1,0,1,3,2,1,2,1]2. 如果可以,雨水容量是多少。

2024-02-25 23:34:51 1122

原创 leetcode-hot100-hash表

hash表主要功能是:记录,当做查找表,时间换空间的一种策略。

2024-02-25 00:52:12 340

原创 点击率预估模型01-FM因子分解机理论与实践

文章目录简介因子分解机FM模型因子分解机FM的优势模型因子分解机求解CodeReference简介因子分解机将支持向量机SVM的优势结合分解模型。如SVM,因子分解机是一个通用的预测器,可以用在任意实数值向量上。但是不同于SVM,因子分解机能通过分解参数对变量之间的交互关系进行建模;即使在非常稀疏的场景下,如推荐系统,也能对交叉特征进行建模。因子分解机可以通过算式优化,在线性时间内进行应用计算;而且不同于SVM在对偶形式中求解问题,FM在原问题空间进行求解,不需要支持向量等,可以直接对模型参数进行估计。

2021-02-06 20:55:55 372

原创 深度学习模型交叉特征建模不理想?试试DCNv2[论文笔记&源码解读]

论文介绍DCN-v2优化了DCN的cross layer,权重参数w由原来的vector变为方阵matrix,增加了网络层的表达能力;同时,为了保证线上应用的耗时不会因为cross layer参数量的增加而增加。观察到cross layer的matrix具有低秩性,使用矩阵分解,将方阵matrix转换为两个低维的矩阵、最后在低秩空间内,利用MoE多专家系统,对特征交叉做非线性变化,进一步增加对交叉特征的建模。vector -> matrix; moe设想:DCNv2是不是可以结合多任务学习、MM

2021-01-01 12:33:30 1263

原创 计算广告之淘宝oCPC智能出价

Paper:Optimized Cost per Click in Taobao Display Advertising解决问题淘宝作为世界上最大的电商平台,每天为上百万的广告主提供十亿多在线广告曝光的机会。从商业目的上说,广告主为特定的场景和目标人群进行竞标以竞争商业流量。平台方在十毫秒内选择合适的广告进行展现曝光。常见的出价方法有cpm和cpc。实现流量和广告的精准匹配,oCPC出价,实现高转化高出价,低转化低出价;同时优化版cpc能实现平台、广告主、用户的三方共赢。传统广告系统以固定的出价来瞄

2020-11-24 23:18:52 1916

原创 推荐论文阅读之多任务建模ESM2

介绍CVR转化率预估过程中存在样本选择偏差和数据稀疏问题。这两个问题在阿里的上一篇论文ESMM中有提到,这里介绍一下。样本选择偏差:CVR模型建模通常使用点击后的样本post-click,或者说使用记录用户在点击后是否产生订单的数据;而模型在实际应用过程中是在整个样本空间上,用户还没有发生点击。这就导致数据有偏,不同分布。在post-click样本上建模后,在实际应用过程中并不能保证模型的准确性,而且应用模型的泛化能力。数据稀疏:在电商系统,如淘宝,用户的行为链,通常包括曝光、点击、购买,各个

2020-11-21 22:50:32 636

原创 【每日一题】48. Rotate Image

问题描述You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotati

2020-10-28 23:31:18 131

原创 【每日一题】46. Permutations

题目描述Given a collection of distinct integers, return all possible permutations.Example:Input: [1,2,3]Output:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]给定一个 没有重复 数字的序列,返回其所有可能的全排列。题解典型的递归问题。1、2、 3的全排列,可以分为以1开头,2、 3的全排列;2开头,1

2020-09-08 23:37:56 142

原创 【每日一题】45. Jump Game II

题目描述Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Your goal is to reach the last index in the minimum number of jumps.

2020-09-07 23:31:52 148

原创 AUC、ROC详解:原理、特点&算法

前言接收者操作特征曲线(ROC)可以用来对分类器的表现可视化,可以依据分类器在ROC上的表现来选择最终的模型。分类性能TP、FP、TN、FN以二分类问题为例,每个实例I将会被映射到正例和负例上{p,n}。模型会将每个实例一个预测结果,结果可能是连续的,也可能是离散的;对于连续的结果,需要根据阈值再进行分类。为了和分类标签区分,我们使用{Y,N}表示每个样本的预测结果。给定一个分类器和一个样本,会有4个输出。如果样本是正例而且被预测为正例,则归为TP;如果被预测为负例,则归为FN;如果样本是负例而且被

2020-09-06 22:38:06 3430

原创 【每日一题】43. Multiply Strings

题目描述Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.Example 1:Input: num1 = "2", num2 = "3"Output: "6"Example 2:Input: num1 = "123", num2 = "456"Output: "56088"

2020-09-01 00:00:25 115

原创 论文笔记-Factorization Machines

因子分解机Factorization Machine的提出是对标SVM和矩阵分解,如SVD++、PITF、FPMC模型。FM集成了SVM的优点,可以应用在任意的实值特征向量上。相比于SVM,FM可以通过分解参数对变量之间的交互建模,因此可以应用于数据稀疏的问题上,来对特征之间的交互进行估计,SVM在这类问题上没有很好的发挥。FM的计算时间可以优化到线性时间,因此FM可以直接优化。不同于对偶SVM,FM不用对原问题进行对偶求解,模型参数可以直接估计计算,不需要支持向量。其他的分解方法,如矩阵分解、并行因子

2020-08-26 23:32:45 244

原创 【每日一题】42. Trapping Rain Water

问题描述Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of

2020-08-25 23:27:22 172

原创 【每日一题】41. First Missing Positive

问题描述Given an unsorted integer array, find the smallest missing positive integer.Example 1:Input: [1,2,0]Output: 3Example 2:Input: [3,4,-1,1]Output: 2Example 3:Input: [7,8,9,11,12]Output: 1Follow up:Your algorithm should run in O(n) time and

2020-08-24 23:43:26 124

原创 【每日一题】40. Combination Sum II

题目描述Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.Each number in candidates may only be used once in the combination.Note:All nu

2020-08-23 22:02:05 138

原创 【每日一题】39. Combination Sum

题目描述Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.The same repeated number may be chosen from candidates unlimited nu

2020-08-20 22:23:57 158

原创 【每日一题】37. Sudoku Solver

题目描述Write a program to solve a Sudoku puzzle by filling the empty cells.A sudoku solution must satisfy all of the following rules:Each of the digits 1-9 must occur exactly once in each row.Each of the digits 1-9 must occur exactly once in each column.

2020-08-16 21:47:06 172

原创 【论文笔记】CVR预估之ESMM模型

概述预测post-click转换率CVR在排序系统如推荐系统、广告中是至关重要的。传统的CVR模型使用深度学习方法已经实现到state-of-the-art水平。但是在实际应用中会遇到几个特定的问题让CVR模型建模变得困难。比如,传统的CVR模型是在点击曝光样本上训练的;但是最终是在整个样本空间上进行应用(曝光样本空间)。这就造成了样本选择偏差问题(Sample Selection Bias)。此外,数据稀疏问题让模型训练变得困难。在这篇论文中,提出利用用户行为序列数据,如曝光—>点击—>转化

2020-08-12 23:05:42 1760

原创 【每日一题】36. Valid Sudoku

题目描述Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:Each row must contain the digits 1-9 without repetition.Each column must contain the digits 1-9 without repetition.Each of the 9

2020-08-10 23:47:56 170

原创 【论文笔记】Optimized Cost per Click in Taobao Display Advertising

解决问题淘宝作为世界上最大的电商平台,每天为上百万的广告主提供十亿多在线广告曝光的机会。从商业目的上说,广告主为特定的场景和目标人群进行竞标以竞争商业流量。平台方在十毫秒内选择合适的广告进行展现曝光。常见的出价方法有cpm和cpc。实现流量和广告的精准匹配,oCPC出价,实现高转化高出价,低转化低出价;同时优化版cpc能实现平台、广告主、用户的三方共赢。传统广告系统以固定的出价来瞄准特定属性的人群和广告放置位置,本质上被视为出价和流量质量的粗粒度匹配。广告客户为争夺不同质量要求而设定的固定出价无法完全

2020-08-09 23:20:55 907

原创 【每日一题】35. Search Insert Position

题目描述Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Example 1:Input: [1,3,5,6], 5Output: 2Example 2:

2020-08-09 23:11:19 100

原创 【每日一题】34. Find First and Last Position of Element in Sorted Array

题目描述Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.Your algorithm’s runtime complexity must be in the order of O(log n).If the target is not found in the array, return [-1, -1].E

2020-08-08 23:55:38 227

原创 【每日一题】33. Search in Rotated Sorted Array

题目描述Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).You are given a target value to search. If found in the array return its index, otherwise return -1.Y

2020-08-05 23:36:24 178

原创 【每日一题】32. Longest Valid Parentheses

题目描述Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.Example 1:Input: "(()"Output: 2Explanation: The longest valid parentheses substring is "()"Example 2:Input: ")()

2020-08-04 23:23:54 145

原创 【每日一题】31. Next Permutation

题目描述Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order).The replacemen

2020-07-31 23:36:22 145

原创 【每日一题】30. Substring with Concatenation of All Words

题目描述You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and without any intervening characters.Example 1:Input:

2020-07-30 23:11:05 178

原创 【每日一题】29. Divide Two Integers

题目描述Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator.Return the quotient after dividing dividend by divisor.The integer division should truncate toward zero, which means losing its frac

2020-07-29 23:58:29 821

原创 【每日一题】28. Implement strStr()

问题描述Implement strStr().Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"Output: 2Example 2:Input: haystack = "aaaaa", needle = "bba"Output: -1

2020-07-28 22:58:37 134

原创 【每日一题】27. Remove Element

题目描述Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.The order of elem

2020-07-27 22:35:09 122

原创 【LeetCode每日一题】26. Remove Duplicates from Sorted Array

题目描述Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.

2020-07-27 07:47:28 142

原创 计算广告笔记-受众定向核心技术

受众定向技术分类总体上看,按照计算框架的不同,这些受众定向技术可以分为3种类型:用户标签,可以表示成t(u)形式的标签,以用户历史行为数据为依据,为用户打上的标签;上下文标签,可以表示成t©形式的标签,根据用户当前的访问行为得到的即时标签;定制化标签,可以表示成t(a, u)形式的标签,也是一种用户标签,不同之处在于是针对某一特定广告主而言的,必须根据广告主的某些属性或数据来加工。以上各种定向中,地域定向、频道定向和上下文定向属于t©的定向方式;人口属性、行为定向属于t(u)的定向方式;重定

2020-07-25 23:06:10 497

原创 【LeetCode每日一题】25. Reverse Nodes in k-Group

问题描述Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes in

2020-07-25 23:01:29 83

原创 计算广告笔记-合约广告核心技术

合约广告的关键特征,是广告投放的价格和量由双方协商约定。合约广告的重点形式是按指定受众购买的、按CPM计费的展示量合约广告。展示量合约广告的投放系统统称为担保式投送系统。它依赖于受众定向、流量预测、点击率预测这3项基本技术,并采用在线分配的方式完成实时决策。广告排期系统对于按CPT结算的广告位合约,媒体一般采用广告排期系统来管理和执行。广告排气系统的一般技术方案是将广告素材按照预先确定的排期直接插入媒体页面,并通过**内容分发网络(CDN)**加速访问。这样可以使广告投放延迟很小,也没有服务器端的压力和

2020-07-24 22:58:26 383

原创 【LeetCode每日一题】24. Swap Nodes in Pairs

问题描述Given a linked list, swap every two adjacent nodes and return its head.You may not modify the values in the list’s nodes, only nodes itself may be changed.Example:Given 1->2->3->4, you should return the list as 2->1->4->3.给定一个链表

2020-07-24 22:52:59 105

原创 【LeetCode每日一题】23. Merge k Sorted Lists

题目描述Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example:Input:[ 1->4->5, 1->3->4, 2->6]Output: 1->1->2->3->4->4->5->6合并k个有序单链表,然后返回这个新链表。分析时间复杂度、空间复杂度。

2020-07-23 22:59:43 142

内存模拟管理

内存模拟管理,BF FF,动态模拟实现。实现线程的分配,显示分配后的空闲分区信息表。链表

2016-01-03

任务管理器实现方案具体介绍

制作自己的任务管理器实现方案,出错处理和用到函数的简单介绍。自己的心得体会。备注:还有不足之处,请私聊。

2015-12-15

c++任务管理器

做自己的任务管理器,实现查看任务,结束任务,查看进程,结束进程,cpu利用率画图,动态显示。MFC框架,c++实现,vs2013编译环境。

2015-12-15

任务管理器

简单的任务管理器,实现查看进程,结束进程。MFC设计,c++编码实现,vs2013编译环境。

2015-12-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除