首页 > 其他 > 详细

Always review

时间:2016-08-28 06:26:46      阅读:292      评论:0      收藏:0      [点我收藏+]

Data structures

A data structure is a way to store and organize data in order to facilitate access and modifications.

Loop invariants

We use loop invariants to help us understand why an algorithm is correct. We must show three things about a loop invariant:

Initialization: It is true prior to the first iteration of the loop.

Maintenance: If it is true before an iteration of the loop, it remains true before the next iteration.

Termination: When the loop terminates, the invariant gives us a useful property that helps show that the algorithm is correct.

Always review

原文:http://www.cnblogs.com/Patt/p/5814221.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!