samzhangqingchuan / editorials Goto Github PK
View Code? Open in Web Editor NEW算法题解& 教程
算法题解& 教程
今天刚做的PDD笔试:
给定一组棍子长度,可以拼接,不能折断,问能否构成正方形(正方形有四条边,且四条边相等)
例子:
[1,1,1,1]
YES
[1,1,1,1,2,2,4,4]
YES
[1,2,3,2,1]
NO
我觉得是DFS问题,没做出来。谢谢。
来自leetcode,每次比赛你都在前三!羡慕啊!
I want to learn dp from qc dalao
5
节算法
里, hdu
已经半个月了,还是宕机状态,实在等不下去了dp[i] = max(sum[i] + dp[j] - common_sum(i, j))
= sum[i] + max(dp[j] - common_sum(i,j))
进入一个区间时 -a,离开一个区间时 +a。当走到 i 位置时,所有还没有关闭的区间 j 都会受到一个惩罚。所以在任意时刻,dp 数组维护的是 dp[j] - common_sum(i,j)。当走过最后一个区间时,由于对于任意 j,common_sum(i, j) 等于 0,所以 max(dp) 就是答案。
求大佬出图topic
不知道是不是我记错了,印象中去年你的主页上有一个google doc的链接,里面写了诸如做题熟练度大于见题的心得之类的。
我看了那个文档看到挺有收获的,但现在找不到了,希望能在看到、学习。
谢谢楼主🙏
刚刚笔试完,凉了
n个数里面选k个,使得k个数相与结果最小
n<=40
1<=每个数字<=2^60
麻烦看下是什么思路,谢谢~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.