一亩三分地

 找回密码 注册账号

扫描二维码登录本站

BBS
Offer多多
Salarytics
交友
Learn
Who's Hiring?
Visa Tracker
疫情动态
指尖新闻
Instant
客户端
微信公众号
扫码关注公众号
留学申请公众号
扫码关注留学申请公众号
Youtube频道
留学博客
关于我们
查看: 2050|回复: 22
收起左侧

[数据结构面试]如何一句话踩住得分点[50 题目+答案]

  [复制链接] |只看干货 |面试经验, 分析|数据科学类, 数科面经
我的人缘0

升级   31.71%


分享帖子到朋友圈
zzh2011 | 显示全部楼层 |阅读模式
本楼: 👍   100% (12)
 
 
0% (0)   👎
全局: 👍   100% (161)
 
 
0% (0)    👎

2020(7-9月) 分析|数据科学类 硕士 全职@ - Other - 技术电面  | Other | fresh grad应届毕业生

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看,没有帐号?注册账号

x


面试过程中常会应用到很多数据结构, 人们常常对数据结构有所了解, 但是无法简洁明了地对它进行定义或一句话的总结. -baidu 1point3acres

本文整理了 50 个常见的数据结构题目, 并且提供了一句话踩住考点的参考答案!

[新人求米, 感激不尽!]

1) What is data structure?

Data structure refers to the way data is organized and manipulated. It seeks to find ways to make data access more efficient. When dealing with the data structure, we not only focus on one piece of data but the different set of data and how they can relate to one another in an organized manner.

2) Differentiate between file and structure storage structure.

The key difference between both the data structure is the memory area that is being accessed. When dealing with the structure that resides the main memory of the computer system, this is referred to as storage structure. When dealing with an auxiliary structure, we refer to it as file structures.

3) When is a binary search best applied?

A binary search is an algorithm that is best applied to search a list when the elements are already in order or sorted. The list is searched starting in the middle, such that if that middle value is not the target search key, it will check to see if it will continue the search on the lower half of the list or the higher half. The split and search will then continue in the same manner.

4) What is a linked list?

A linked list is a sequence of nodes in which each node is connected to the node following it. This forms a chain-like link for data storage.

5) How do you reference all the elements in a one-dimension array?

To reference all the elements in a  one -dimension array, you need to use an indexed loop, So that, the counter runs from 0 to the array size minus one. In this manner, You can reference all the elements in sequence by using the loop counter as the array subscript.

6) In what areas do data structures are applied?

Data structures are essential in almost every aspect where data is involved. In general, algorithms that involve efficient data structure is applied in the following areas: numerical analysis, operating system, A.I., compiler design, database management, graphics, and statistical analysis, to name a few.

7) What is LIFO?
. From 1point 3acres bbs
LIFO is a short form of Last In First Out. It refers how data is accessed, stored and retrieved. Using this scheme, data that was stored last should be the one to be extracted first. This also means that in order to gain access to the first data, all the other data that was stored before this first data must first be retrieved and extracted.

8 ) What is a queue?

A queue is a data structure that can simulate a list or stream of data. In this structure, new elements are inserted at one end, and existing elements are removed from the other end.

9) What are binary trees?

A binary tree is one type of data structure that has two nodes, a left node, and a right node. In programming, binary trees are an extension of the linked list structures.

10) Which data structures are applied when dealing with a recursive function?

Recursion, is a function that calls itself based on a terminating condition, makes use of the stack. Using LIFO, a call to a recursive function saves the return address so that it knows how to return to the calling function after the call terminates.

11) What is a stack?

A stack is a data structure in which only the top element can be accessed. As data is stored in the stack, each data is pushed downward, leaving the most recently added data on top.
. 1point3acres
12) Explain Binary Search Tree

A binary search tree stores data in such a way that they can be retrieved very efficiently. The left subtree contains nodes whose keys are less than the node’s key value, while the right subtree contains nodes whose keys are greater than or equal to the node’s key value. Moreover, both subtrees are also binary search trees.

13) What are multidimensional arrays?

Multidimensional arrays make use of multiple indexes to store data. It is useful when storing data that cannot be represented using single dimensional indexing, such as data representation in a board game, tables with data stored in more than one column.

14) Are linked lists considered linear or non-linear data structures?

It depends on where you intend to apply linked lists. If you based it on storage, a linked list is considered non-linear. On the other hand, if you based it on access strategies, then a linked list is considered linear.

15) How does dynamic memory allocation help in managing data?

Apart from being able to store simple structured data types, dynamic memory allocation can combine separately allocated structured blocks to form composite structures that expand and contract as needed.

16) What is FIFO?

FIFO stands for First-in, First-out, and is used to represent how data is accessed in a queue. Data has been inserted into the queue list the longest is the one that is removed first.

17) What is an ordered list?

An ordered list is a list in which each node’s position in the list is determined by the value of its key component, so that the key values form an increasing sequence, as the list is traversed.

18) What is merge sort?

Merge sort, is a  divide-and-conquer approach for sorting the data. In a sequence of data, adjacent ones are merged and sorted to create bigger sorted lists. These sorted lists are then merged again to form an even bigger sorted list, which continues until you have one single sorted list.
-baidu 1point3acres
19) Differentiate NULL and VOID

Null is a value, whereas Void is a data type identifier. A variable that is given a Null value indicates an empty value. The void is used to identify pointers as having no initial size.

20) What is the primary advantage of a linked list?

A linked list is an ideal data structure because it can be modified easily. This means that editing a linked list works regardless of how many elements are in the list.
. check 1point3acres for more.
21) What is the difference between a PUSH and a POP?

Pushing and popping applies to the way data is stored and retrieved in a stack. A push denotes data being added to it, meaning data is being “pushed” into the stack. On the other hand, a pop denotes data retrieval, and in particular, refers to the topmost data being accessed.

22) What is a linear search?

A linear search refers to the way a target key is being searched in a sequential data structure. In this method, each element in the list is checked and compared against the target key. The process is repeated until found or if the end of the file has been reached.

23) How does variable declaration affect memory allocation?

The amount of memory to be allocated or reserved would depend on the data type of the variable being declared. For example, if a variable is declared to be of integer type, then 32 bits of memory storage will be reserved for that variable.

24) What is the advantage of the heap over a stack?

The heap is more flexible than the stack. That’s because memory space for the heap can be dynamically allocated and de-allocated as needed. However, the memory of the heap can at times be slower when compared to that stack.

25) What is a postfix expression?

A postfix expression is an expression in which each operator follows its operands. The advantage of this form is that there is no need to group sub-expressions in parentheses or to consider operator precedence.

26) What is Data abstraction?

Data abstraction is a powerful tool for breaking down complex data problems into manageable chunks. This is applied by initially specifying the data objects involved and the operations to be performed on these data objects without being overly concerned with how the data objects will be represented and stored in memory.

27) How do you insert a new item in a binary search tree?

Assuming that the data to be inserted is a unique value (that is, not an existing entry in the tree), check first if the tree is empty. If it’s empty, just insert the new item in the root node. If it’s not empty, refer to the new item’s key. If it’s smaller than the root’s key, insert it into the root’s le
游客,本帖隐藏的内容需要积分高于 188 才可浏览,您当前积分为 0。
查看如何攒积分 Click here for more info.
cs and are used to connect nodes where data can be stored and retrieved.

44) Differentiate linear from a nonlinear data structure.

The linear data structure is a structure wherein data elements are adjacent to each other. Examples of linear data structure include arrays, linked lists, stacks, and queues. On the other hand, a non-linear data structure is a structure wherein each data element can connect to more than two adjacent data elements. Examples of nonlinear data structure include trees and graphs.
. check 1point3acres for more.
45) What is an AVL tree?
. check 1point3acres for more.
An AVL tree is a type of binary search tree that is always in a state of partially balanced. The balance is measured as a difference between the heights of the subtrees from the root. This self-balancing tree was known to be the first data structure to be designed as such.

46) What are doubly linked lists?

Doubly linked lists are a special type of linked list wherein traversal across the data elements can be done in both directions. This is made possible by having two links in every node, one that links to the next node and another one that connects to the previous node.

47) What is Huffman’s algorithm?

Huffman’s algorithm is used for creating extended binary trees that have minimum weighted path lengths from the given weights. It makes use of a table that contains the frequency of occurrence for each data element.
. check 1point3acres for more.
48) What is Fibonacci search?

Fibonacci search is a search algorithm that applies to a sorted array. It makes use of a divide-and-conquer approach that can significantly reduce the time needed in order to reach the target element.

49) Briefly explain recursive algorithm.
. From 1point 3acres bbs
Recursive algorithm targets a problem by dividing it into smaller, manageable sub-problems. The output of one recursion after processing one sub-problem becomes the input to the next recursive process.

50) How do you search for a target key in a linked list?

To find the target key in a linked list, you have to apply sequential search. Each node is traversed and compared with the target key, and if it is different, then it follows the link to the next node. This traversal continues until either the target key is found or if the last node is reached.


// 祝大家顺利上岸!

评分

参与人数 54大米 +85 收起 理由
mtmmy + 2 很有用的信息!
emmakaotuofu + 2 给你点个赞!
whynot0723 + 1 给你点个赞!
wanli + 1 赞一个
jinghuayuan + 1 good one
Gozilala + 1 很有用的信息!
vincezz + 1 赞一个
Sabrina璃珞珞 + 1 赞一个
Bilililii + 1 赞一个
cherry90922 + 1 谢谢楼主

查看全部评分


上一篇:Voleon machine learning research 第一轮面试
下一篇:亚麻 Sr BIE 面筋

本帖被以下淘专辑推荐:

我的人缘0

升级   31.71%

 楼主| zzh2011 2020-8-20 03:41:21 | 显示全部楼层
本楼: 👍   0% (0)
 
 
0% (0)   👎
全局: 👍   100% (161)
 
 
0% (0)    👎
欢迎大家讨论! 勘误! 补充! 祝大家早日上岸! Stay safe!

评分

参与人数 2大米 +3 收起 理由
bolanbujing321 + 1 赞一个
JinnyHui + 2 赞一个!

查看全部评分

回复

使用道具 举报

我的人缘0

升级   48.57%

FinalLi 2020-8-20 12:20:16 | 显示全部楼层
本楼: 👍   100% (1)
 
 
0% (0)   👎
全局: 👍   75% (21)
 
 
25% (7)    👎
感谢楼主分享

评分

参与人数 1大米 +1 收起 理由
zzh2011 + 1 赞一个

查看全部评分

回复

使用道具 举报

我的人缘0

升级   11%

resco 2020-8-20 11:06:50 | 显示全部楼层
本楼: 👍   100% (1)
 
 
0% (0)   👎
全局: 👍   100% (47)
 
 
0% (0)    👎
谢谢分享,已加米.

评分

参与人数 1大米 +1 收起 理由
zzh2011 + 1 赞一个

查看全部评分

回复

使用道具 举报

我的人缘0

升级   81.5%

samt 2020-8-20 06:54:37 | 显示全部楼层
本楼: 👍   100% (1)
 
 
0% (0)   👎
全局: 👍   97% (37)
 
 
2% (1)    👎
mark一下!分数暂时不够。等够了,回来加米!!

评分

参与人数 1大米 +1 收起 理由
zzh2011 + 1 赞一个

查看全部评分

回复

使用道具 举报

我的人缘0

升级   49.5%

TingweiZhou 2020-8-20 03:20:14 | 显示全部楼层
本楼: 👍   0% (0)
 
 
0% (0)   👎
全局: 👍   100% (44)
 
 
0% (0)    👎
Good pointssss! 已收藏!

评分

参与人数 1大米 +1 收起 理由
zzh2011 + 1 欢迎来一亩三分地论坛!

查看全部评分

回复

使用道具 举报

我的人缘0

升级   31.71%

 楼主| zzh2011 2020-8-20 03:21:18 | 显示全部楼层
本楼: 👍   0% (0)
 
 
0% (0)   👎
全局: 👍   100% (161)
 
 
0% (0)    👎
TingweiZhou 发表于 2020-8-20 03:20
Good pointssss! 已收藏!

thank you ~

评分

参与人数 1大米 +1 收起 理由
daydreamer735 + 1 赞一个

查看全部评分

回复

使用道具 举报

我的人缘0

升级   8.29%

本楼: 👍   0% (0)
 
 
0% (0)   👎
全局: 👍   97% (802)
 
 
2% (20)    👎
感谢楼主的整理!!多在下面回复我再给你加点米😄

评分

参与人数 1大米 +1 收起 理由
zzh2011 + 1 赞一个

查看全部评分

回复

使用道具 举报

我的人缘0

升级   31.71%

 楼主| zzh2011 2020-8-20 03:41:37 | 显示全部楼层
本楼: 👍   0% (0)
 
 
0% (0)   👎
全局: 👍   100% (161)
 
 
0% (0)    👎
JinnyHui 发表于 2020-8-20 03:31
感谢楼主的整理!!多在下面回复我再给你加点米😄

太感谢啦!!!!你是天使吧哈哈哈哈

评分

参与人数 1大米 +2 收起 理由
JinnyHui + 2 说的太对了!

查看全部评分

回复

使用道具 举报

我的人缘0

升级   1.5%

本楼: 👍   100% (1)
 
 
0% (0)   👎
全局: 👍   100% (1)
 
 
0% (0)    👎
感激不尽 谢谢楼主

评分

参与人数 1大米 +1 收起 理由
zzh2011 + 1 赞一个

查看全部评分

回复

使用道具 举报

我的人缘0

升级   23%

本楼: 👍   100% (1)
 
 
0% (0)   👎
全局: 👍   90% (10)
 
 
9% (1)    👎
感谢!已经加了米lol

评分

参与人数 1大米 +1 收起 理由
zzh2011 + 1 赞一个

查看全部评分

回复

使用道具 举报

我的人缘0

升级   25.43%

本楼: 👍   100% (1)
 
 
0% (0)   👎
全局: 👍   84% (107)
 
 
15% (20)    👎
感谢楼主分享~加米啦!

评分

参与人数 1大米 +1 收起 理由
zzh2011 + 1 赞一个

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

隐私提醒:
■拉群请前往同学同事飞友|拉群结伴版块,其他版块拉群,帖子会被自动删除
■论坛不能删帖,为防止被骚扰甚至人肉,不要公开留微信等联系方式,请以论坛私信方式发送。
■特定版块可以超级匿名:https://pay.1point3acres.com/tools/thread
■其他版块匿名方法:http://www.1point3acres.com/bbs/thread-405991-1-1.html

手机版|||一亩三分地

Powered by Discuz! X3

© 2001-2013 Comsenz Inc. Design By HUXTeam

Some icons made by Freepik from flaticon.com

快速回复 返回顶部 返回列表