用于学术伪代码的集合/向量/映射操作概述
我是一名博士生——在学术界,人们经常使用伪代码来描述算法。像向量、集合和映射这样的结构经常出现。是否存在可以在某处对此类数据结构执行的操作的完整列表?
谢谢
I am a PhD student -- In accademia people often describe algorithms using pseudocode. Structures like vectors, sets and mappings crop up very often. Is there a comprehensive list of operations one can perform on such data structures somewhere?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如我发现的,在教授算法和数据结构时,对于此类操作没有“一个正确的标准”。例如,在某些地方所有容器都有“empty()”,而在其他地方则没有。一切都取决于您的教学目标和讲座计划。想一想,在教学时你想强调什么。想一想,什么最小但可理解的操作集足以满足您想要展示的算法。无论如何,你要展示什么(也许讲座参考资料是首先检查的正确位置),我认为值得给学生参考SGI 的 STL 文档。因为他们可能想发现自己的知识有用,或者尝试展示的东西。我推荐学生 C++,因为我和他们发现它比 Java 更好(更快、更舒服)实现算法(好吧,Python 似乎也适合学术目的,但它“隐藏”了很多复杂性问题,而学生应该请注意)。
As I've found, while teaching Algorithms and Data-structures, there is no "one right standard" for such set of operations. As an example, in some places all containers have "empty()" in others not. Everything depends on you teaching goals and lecture program. Think, what you would like to stress out, when teaching. Think, what minimal, but understandable set of operations is adequate to algorithms you would like to show. No metter, what are you going to show (maybe lecture reference materials are right place to check-out first), I think it's worth to give students references to SGI's STL documentation. As they might like to find their knowledge useful, or experiment with shown stuff. I recommend students C++, as I and they find it much better (faster, comfortable) for implementing algorithms, than java (ok, python seems good for academic purposes as well, but it "hides" a lot of complexity issues, while students should be aware).