在 Java 中实现自己的 List、Stack、Queue 或其他数据结构的原因
几乎在每次面试中我都会被问到一些暗示数据结构实现的问题。 在 Java 应用程序中实现自己的数据结构真的有充分的理由吗?
Almost on every interview I'm asked some questions implies data structure implementation.
Is there really good reasons to implement own data structures in Java application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不,在大多数情况下可能不是。
但面试官想检查你是否理解它们背后的理论以及如何正确使用它们。
No, probably not in most cases.
But the interviewer wants to check you understand the theory behind them and how to use them correctly.
《数据结构与算法》是计算机编程领域不可缺少的领域。无论编程范例或语言如何,了解一些基本算法和数据结构都很重要。
尝试使用 C 等过程语言来练习这些。
"Data Structures and algorithms" is an indispensable field in the area of computer programming. It's important you know some of the basic algorithms and data structures irrespective of the programming paradigm or the language.
Try practicing these using a procedural languages like C.
也许知道何时使用列表、数组、字典等更有用。
使用正确的数据结构不仅会影响性能,还会影响可读性、可维护性以及代码的清晰度。
很少需要创建自己的。
Probably it is far more useful to know WHEN to use a list, array, dictionary etc.
Using the correct data structure influences not only performance but also readability and maintainability and code clearity.
Creating your own is seldom necessary.
很高兴知道 - 提供的集合类涵盖了大多数用例。更多的是关于基础/高级CS知识以及语言的具体应用。了解细节对于选择正确的数据结构、评估性能、线程安全等至关重要。
Its good to know - the supplied collection classes span the most use cases. Its more about basic/advanced CS knowledge and specific application in a language. Knowing the details is essential to choose the right data structures, evaluate performance , thread safety etc.