程序员技术才能-数据结构篇(一)

1.     What is data structure?

A data structure is away of organizing data that considers not only the items stored, but also theirrelationship to each other. Advance knowledge about the relationship betweendata items allows designing of efficient algorithms for the manipulation ofdata.

 什么是数据结构?

数据结构是组织数据的方式,不仅考虑存储的数据项,而且要考虑他们之间的关系。合理的数据结构能够帮助设计实现高效算法。

2.     List out the areas in which data structures are applied extensively?

Ø  Compiler Design,

Ø  Operating System,

Ø  Database Management System,

Ø  Statistical analysis package,

Ø  Numerical Analysis,

Ø  Graphics,

Ø  Artificial Intelligence,

Ø  Simulation

 列举在哪些领域数据结构广泛使用?

编译器设计、操作系统、数据库管理系统、统计分析、数值分析、图形学、人工智能、仿真等。

3.     What are the major data structures used in the following areas :RDBMS, Network data model & Hierarchical data model.

Ø  RDBMS                        – Array  (i.e. Array ofstructures)

Ø  Network data model      –Graph

Ø  Hierarchical data model – Trees

在如下领域中使用的主要数据结构:RDBMS, 网络数据模型&层次数据模型。

RDBMS:数组

网络数据模型:图

层次数据模型:树 

4.     If you are using C language to implement the heterogeneous linkedlist, what pointer type will you use?

The heterogeneouslinked list contains different data types in its nodes and we need a link,pointer to connect them. It is not possible to use ordinary pointers for this.So we go for void pointer. Void pointer is capable of storing pointer to anytype as it is a generic pointer type.

如果你使用C语言实现混杂的链表,你使用什么指针类型?

混杂链表节点中包含不同数据类型,我们需要指针来连接他们。不可能用普通指针,因此我们使用void指针。void指针作为通用指针类型,能够存储任何类型的指针。       

5.     Minimum number of queues needed to implement the priority queue?

Two. One queue is usedfor actual storing of data and another for storing priorities.

 实现优先级队列最少需要多少个队列?

两个,一个队列存储实际数据,另一个存储优先级。

6.     What is the data structures used to perform recursion?

Stack. Because of itsLIFO (Last In First Out) property it remembers its ‘caller’ so knows whom toreturn when the function has to return. Recursion makes use of system stack forstoring the return addresses of the function calls.

       Every recursive function has its equivalentiterative (non-recursive) function. Even when such equivalent iterativeprocedures are written, explicit stack is to be used.

 执行递归的数据结构是什么?

栈。因为栈的LIFO本性,栈记录调用者,因此知道返回地址。递归使用系统栈保存函数调用的返回地址。

每个递归函数都有对等的迭代(非递归)函数。即使编写相应的迭代过程,也是在使用显式栈。

7.     What are the notations used in Evaluation of Arithmetic Expressionsusing prefix and postfix forms?

       Polishand Reverse Polish notations.

 前缀和后缀形式数学表达式使用什么符号?

波兰式和逆波兰式。

8.     Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and Postfix notations.

       PrefixNotation:

  ^ - * +ABC - DE + FG

Postfix Notation:

  AB + C * DE - - FG + ^

将表达式((A+B)*C-(D-E)^(F+G))转化为对等的前缀和后缀形式。

前缀: -*+ABC ^-DE +FG

后缀:AB+C*DE-FG+^-

9.     Sorting is not possible by using which of the following methods?

       (a) Insertion    

       (b) Selection    

       (c) Exchange     

       (d) Deletion

 

       (d)Deletion.

Using insertion we canperform insertion sort, using selection we can perform selection sort, usingexchange we can perform the bubble sort (and other similar sorting methods).But no sorting method can be done just using deletion.

排序不可能使用如下那种方法?

(a) 插入

(b)选择

(c)交换

(d)删除


 

10. A binary tree with 20 nodes has            null branches?

       21

       Letus take a tree with 5 nodes (n=5)

 

 It will have only 6 (ie,5+1) nullbranches. In general,

       A binary tree with n nodes has exactly n+1null nodes. 

20个节点的二叉树有多少个空树枝?

21

有n个节点的二叉树有n+1个空节点。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值