dev-xys / algorithms Goto Github PK
View Code? Open in Web Editor NEW全面的算法代码仓库
License: The Unlicense
全面的算法代码仓库
License: The Unlicense
在main函数最下面加了一句之后:
// Add more actions here.
for (int i = 1; i <= n; i++)
printf("%i ", H[i]);
输入
5
999 888 777 66 5
输出
999 5 777 888 66
难道不应该最小的元素在顶端吗。。。 QwQ
目前版本的Splay在第一次查找已存在的元素时返回-1。
我曾经测试过我的手写快排,虽然要比STL中的sort函数稍微慢一些,但是慢的并不多。我在使用手写快排提交CodeVS - 1231 最优布线问题时,倒数第二个测试点超时,并且无论怎样优化都仍然超时,无奈之下只好去看题解,发现题解中的程序全部使用sort函数进行排序,于是我也改用sort,果然时间绰绰有余地用过了。
另外需要注意的一点:我的手写快排在输入元素全部相同的情况下复杂度会降至最坏情况O(n2)。但是通过观察输入数据发现,排序关键字并没有被刻意设计为全部相同。
- 24OI/Standard_Code_Library#4 这里有一些知识点整理
- 推荐 SATA 协议 https://github.com/zTrix/sata-license
- 第三件事一时间想不起来了……
相信你们能够创造更多的伟大!
为什么最后返回的是satellite 这个值,能把key 和 satellite 注释一下吗,谢谢
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.