维基百科代码?任何人都可以查看和编辑代码的地方?
是否有一个网站允许任何人查看和编辑算法的实现(Python、C++ 等)?
例如,有一个名为“帕斯卡三角”的页面。下面的内容展示了如何用Python实现帕斯卡三角形的代码。它还显示函数参数为 5 时的输出。
控制台:
>>> pascal_triangle(5)
[1]
[1, 1]
[1, 2, 1]
[1, 3, 3, 1]
[1, 4, 6, 4, 1]
Is there a website that allows anybody to view and edit implementations (in Python, C++, etc.) of algorithms?
For example, there is a page called Pascal's Triangle. The content below shows the code of how to implement Pascal's Triangle in Python. It also shows the output when the function has a parameter of 5.
Console:
>>> pascal_triangle(5)
[1]
[1, 1]
[1, 2, 1]
[1, 3, 3, 1]
[1, 4, 6, 4, 1]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不完全确定,因为这不是一个编程问题,但没有标记。不过,为了回答您的问题,可能适合您目的的网站是 algorithmist ?它非常有用,但如果我没记错的话,它重点关注 C++ 和 C。我不确定有多少页面有实现——许多页面也关注 UVa 问题,并且有解决问题的实现,而不是纯粹的算法。
I'm not entirely sure, since this isn't a programming question, but no flagging. Still, in answer to your question, a possible site that might suit your purposes would be algorithmist? It's pretty useful, but it has a focus on C++ and C if I recall correctly. I'm not sure how many pages have implementations on them -- many of the pages also focus on UVa problems and have implementations that solve problems, rather than being purely algorithmic.
如果您也想执行代码,请尝试 ideone.com。
If you want to execute code, too, try ideone.com.