zoukankan      html  css  js  c++  java
  • Data Structure

    Computer programs usually operate on tables of information. In most cases these tables are not simply amorphous masses of numerical values;they involve important structural relationships between the data elements.  

    In its simplest form, a table might be a linear list of elements, when its relevant structural properties might include the answers to such questions as: Which element is first in the list? Which is last? Which elements precede and follow a given one? How many elements are in the list? A lot can be said about structure even in this apparently simple case. 

    In more complicated situations, the table might be a two-dimensional array (a matrix or grid, having both a row and a column structure), or it might be an n-dimensional array for higher values of n; it might be a tree structure, representing hierarchical or branching relationships; or it might be a complex multilinked structure with a great many interconnections, such as we may find in a human brain.

    In order to use a computer properly, we need to understand the structural relationships present within data, as well as the basic techniques for representing and manipulating such structure within a computer.

    怎样去设计程序?
    -->业务需求:从问题实际出发,写一个概括性的抽象的文字描述。

    -->解决方案:定义变量,选定函数<确定要包含哪些头文件>,确定程序实现的逻辑过程(算法)。<思路> (伪代码)

    -->技术实现:按照以上两点,依据解决问题的顺序把语句和函数写出代码。

    注意:不要边想边写代码: 先把主干代码写出来,再慢慢加枝节代码(输出的格式更漂亮, 容错措施, 更细的一些功能实现) ß甚至把主干代码部分删了重写更具体的实现也是可以的. ß代码不是一次写成的!  ß专业体现在细节!

  • 相关阅读:
    懵懵懂懂的样子
    scrollTop总是为0
    论搜索引擎的重要性
    利用swiper仿iphone时间设置滚轮控件
    厉害了,new Date().getTime()
    invalid Date!iphone上支持的时间格式
    我不知道的MIME
    设置canvas元素的宽高的奇妙(jiujie)发现
    用SVN在github下下载一个文件夹到本地
    c++ md5算法实现(转)
  • 原文地址:https://www.cnblogs.com/007beta/p/3844722.html
Copyright © 2011-2022 走看看