主要JavaScript数据结构 [英] Major JavaScript Data Structures

查看:104
本文介绍了主要JavaScript数据结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一份工作面试,公司的核心技术之一是JavaScript。我被告知接下来的采访将集中在JS数据结构,这个术语从来没有出现在我的任何教育中。我在Google上花费一点时间尝试了解更多关于他们的信息,最好的事情是这个维基百科页面



正如你所知,项目列表相当长,在面试之前要学习太多。由于维基文章是通用的而不是JS具体的,我知道那里的一些(大部分?)不适用于JS。我可以得到一些帮助,主要的数据结构是什么,我应该把重点放在哪里?我无法在Google上找到答案。



我知道数组是我需要知道的主要数据之一。我应该准备谈什么其他主要的数据结构?



感谢任何帮助!!!

解决方案

实际上,Javascript本身没有很多内置的数据结构。



如果我是在你的鞋子里,我会给自己一般的数据结构,这适用于一般编程,而不是任何特定的语言。



如果你是对JS尤其不感兴趣,我建议的一个资源是 Mozilla开发人员网络,特别是本指南,这应该涵盖很多方面,包括核心对象类型(数组,字符串,日期等)。你总是可以看看w3schools,但是我真的不太推荐它,因为它有一些不准确之处。



祝你好运! p>

编辑:你甚至可以尝试在JS中实现某些数据结构来掌握如何处理。知道一个红黑树如何工作真的很棒,但是知道如何在一个给定的语言中很好地实现它呢绝对是一个加号! ;)


I have a job interview coming up, and one of the core technologies of the company is JavaScript. I was told that the next interview will focus on JS Data Structures, a term that never came up in any of my education. I have spend a while on Google trying to find out more about them, and the best thing I could come across was this Wikipedia page.

As you can tell, the list of items is quite long and way too much to study before my interview. Since the Wiki article is generic and not JS specific, I know that some (most?) of what's on there does not apply to JS. Can I get some help on what are the main data structures and what I should focus my time on? I was unable to find an answer to that on Google.

I know Arrays are one of the major ones that I will need to know. What are the other major data structures I should be prepared to talk about?

Thanks for any help!!!

解决方案

Javascript itself doesn't have a lot of built-in data structures to speak of, actually.

If I were in your shoes, I'd give myself a run-down of data structures in general, which apply to programming in general instead of any specific language.

If you're not feeling confident about JS in particular, one resource I'd recommend would be the Mozilla Developer Network, and in particular this guide which should cover a lot of ground, including the core object types (Array, String, Date, etc). You can always give a look to w3schools, but I don't really recommend it much anymore as it has a number of inaccuracies.

Good luck on your interview!

EDIT: You could probably even try to implement certain data structures in JS to get to grips with how you would go about it. Knowing how a red-black tree works is really great and all, but knowing how to implement it nicely in a given language is definitely a plus! ;)

这篇关于主要JavaScript数据结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆