比较类似术语之间的差异

之间的区别

Home / 技术 / 它 / 编程 /算法和伪代码之间的差异

算法和伪代码之间的差异

2011年5月30日发表Indika

算法vs Pseudocode

算法只是解决问题的解决方案。算法将问题作为一组定义的步骤或指令提供的解决方案。伪代码是描述算法的一般方法。伪代码不使用特定编程语言的语法,因此不能在计算机上执行。但是它与编程语言的结构非常相似,并且包含大致相同的细节。

算法

一个算法给出了解决一个特定问题lem as a well defined set of steps. A recipe in a cookbook is a good example of an algorithm. When a computer is used for solving a particular problem, the steps to the solution should be communicated to the computer. This makes the study of algorithms a very important part in computer science. An algorithm is executed in a computer by combining lot of elementary operations such as additions and subtractions to perform more complex mathematical operations. But translating the idea of the algorithm in to computer code is not straight forward. Specially, converting an algorithm in to a low level language such as assembly language could be very tedious than using a high level language such as C or Java. When designing an algorithm, it is important to do an analysis on the resources (such as time and storage) required by the algorithm. Notations such as big O notation are used for performing time and storage analysis on algorithms. Algorithms can be expressed using natural languages, pseudocode, flowcharts, etc.

伪代码

伪代码是可用于表示算法的方法之一。它不是用编程语言使用的特定语法编写的,因此不能在计算机中执行。有很多用于编写伪动物的格式,其中大多数从流行的编程语言(例如C,LISP,Fortran等)借用了一些结构。此外,在呈现不重要的细节时,也使用了自然语言。大多数算法都是使用伪代码提出的,因为可以使用熟悉不同编程语言的程序员阅读和理解它们。诸如Pascal之类的某些语言具有与假码相似的语法,从而使从伪代码转换为相应的程序代码的转换更加容易。伪代码允许包含控制结构,例如whir,如果是else,重复,直至,for和case,它们都以许多高级语言存在。

算法和伪代码之间有什么区别?

算法是一个定义明确的步骤序列,为给定问题提供解决方案,而伪代码是可用于表示算法的方法之一。虽然算法可以用自然语言编写,但伪代码以与高级编程语言结构密切相关的格式编写。但是伪代码不使用特定的编程语言语法,因此可以由熟悉不同编程语言的程序员理解。此外,将伪代码中提出的算法转换为编程代码要比转换以自然语言编写的算法要容易得多。

相关文章:

C和C ++之间的差异 之间的区别Integer and Pointer 之间的区别Java and C language Microsoft .NET Framework 3.5和.NET Framework 4.0之间的区别 之间的区别Procedures and Functions in Programming

提交以下:编程Tagged With:算法,,,,组装语言,,,,流程图,,,,高级语言,,,,天然语言,,,,编程语言,,,,伪代码,,,,伪代码,,,,syntax

关于作者:Indika

Indika,BSC.ENG,MSECE计算机工程博士。计算机科学是一名助理教授,在生物信息学,计算生物学和生物医学自然语言处理方面具有研究兴趣。

Comments

  1. Poojitha Pallesays

    October 14, 2012 at 4:28 pm

    very good description

    Poojitha Palle

    回复
  2. noctis lucis Ishutinsays

    November 12, 2014 at 7:39 am

    this is really help me… thanks a lot.. XD

    回复
  3. Sukusays

    May 14, 2017 at 4:26 am

    我的理解的最佳答案

    回复
  4. Bijayasays

    2017年9月14日下午2:47

    描述更多PLZ

    回复
  5. Mequanint Mollasays

    2017年11月22日下午3:50

    ThiS is brief explain,I anderstand what I want,

    回复
  6. Sai Pranav Raosays

    2017年12月10日上午6:36

    优秀的保持

    回复
  7. 查尔斯says

    2018年10月31日下午1:01

    描述有所帮助

    回复

Leave a ReplyCancel reply

您的电子邮件地址不会被公开。必需的地方已做标记*

Request Article

精选文章

冠状病毒和冷症状之间的差异

冠状病毒和冷症状之间的差异

之间的区别Coronavirus and SARS

之间的区别Coronavirus and SARS

冠状病毒和流感的差异

冠状病毒和流感的差异

冠状病毒和covid 19之间的差异

冠状病毒和covid 19之间的差异

You May Like

之间的区别Tikka and Tikka Masala

胰岛素和血糖有什么区别

胰岛素和血糖有什么区别

星形胶质细胞瘤和胶质母细胞瘤之间有什么区别

星形胶质细胞瘤和胶质母细胞瘤之间有什么区别

突变和多态性之间的差异

纤维素和糖原和葡萄糖之间的差异

纤维素和糖原和葡萄糖之间的差异

最新的帖子

  • 预防和治疗之间有什么区别
  • DSM IV和DSM V自闭症有什么区别
  • What is the Difference Between Molecular Formula and Structural Formula
  • 痤疮和湿疹有什么区别
  • 突变率和替代率之间有什么区别
  • Vermicompost和堆肥有什么区别
  • Home
  • 空缺
  • 关于
  • Request Article
  • Contact Us

版权所有©2010-2018之间的区别。版权所有。使用条款and Privacy Policy:Legal。