文章
Codeforces 915C Permute Digits
PermuteDigitstimelimitpertest:1secondsmemorylimitpertest:256megabytesinput:standardinputoutput:standardoutputProblemDescr
剑指offer之基础知识数组
<blockquote为了实习的准备,开始刷题来巩固基础算法和数据结构,大神轻喷。</blockquote1.数组中重复的数字题目描述:在一个长度为n的数组里的所有数字都在0到n1的范围内。数组中某些数字是重复的,但不知道有几个数字是重复的。也不知道每个数字重复几次。请找出数组中任意
Maximal Rectangle
MaximalRectangle(https://link.segmentfault.com/?encoDRBx2kSIarrYCrUDmGjvw%3D%3D.CKzCRafFddevgfZxxkQ9y%2F%2F12qNUH9akyzxmTmXk%2Fa4MUTRMcNpwmR8ox
微信协程库libco研究(三):协程的事件管理
前面的两篇文章中介绍了微信的libco库如何hook系统函数(https://segmentfault.com/a/1190000012561446)和协程的创建和管理(https://segmentfault.com/a/1190000012656741),本篇文章将介绍libco库是进行
稀疏矩阵快速转置算法实现
对于转置,如果我们不考虑转置之后的元素顺序,实际上只需要遍历一遍整个三元组,交换x和y的值就ok了。之所以需要快速转置算法是因为如果三元组在初始时是按照每个三元组x的值从大到小排的,我们希望在转置后,其顺序依旧是按照x的值大小排列。算法思想对于这个问题,我们可以先统计y每个取值的数
LeetCode 129. Sum Root to Leaf Numbers
Givenabinarytreecontainingdigitsfrom09only,eachroottoleafpathcouldrepresentanumber.Anexampleistheroottoleafpath1>2>
LeetCode 200. Number of Islands
Givena2dgridmapof<code&39;1&39;</codes(land)and<code&39;0&39;</codes(water),countthenumberofislands.Anislandissurroundedby
LeetCode 300. Longest Increasing Subsequence
Givenanunsortedarrayofintegers,findthelengthoflongestincreasingsubsequence.Forexample,Given<code10,9,2,5,3,7,101,18</code,T
LeetCode 542. 01 Matrix
Givenamatrixconsistsof0and1,findthedistanceofthenearest0foreachcell.Thedistancebetweentwoadjacentcellsis1.Example1:Input:
LeetCode 547. Friend Circles
ThereareNstudentsinaclass.Someofthemarefriends,whilesomearenot.Theirfriendshipistransitiveinnature.Forexample,ifAisadirect
已加载文章中没有匹配内容,试试其他关键词或清空搜索。