想用C ++代码设计一个新算法吗? [英] Want to design a new algorithm in C++ code ?

查看:61
本文介绍了想用C ++代码设计一个新算法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


i希望用C ++设计一个新的算法,所以想知道我如何设计或者设计算法的基本要求是什么,我也有C ++的知识,请帮助我并支持我! div class =h2_lin>解决方案

你没有用C ++设计新的算法或任何其他语言。

算法是语言无关的:它们是一种方式做事而不是实施。



想一想:当你被教导开车时,你会被教导驾驶算法 - 一套规则以及管理如何处理道路上任何特定情况以及在任何特定情况下您的行为方式的实践。驾驶汽车就是该算法的实现。



如果你已经有了算法,那么实现就是将指令的语言独立性转化为具体的过程。代码 - 没有捷径我们可以给你适合每种算法和每种语言。或者甚至是任何算法或任何语言。



像对待任何其他规范一样对待算法,并从那里开始工作。


Hi i want to design a new algorithm in C++ so want to know how i approach toward design or what are my basic requirements to design algorithm and i have knowledge of C++ also, Please help me and support me!

解决方案

You don't "design a new algorithm in C++" or any other language.
Algorithms are language independent: they are a way of doing things rather than the implementation.

Think of it this way: when you are taught to drive, you are taught the "driving algorithm" - a set of rules and practices which govern how you approach any given situation on the road and how you behave in any given circumstances. Driving a car is the implementation of that algorithm.

If you already have an algorithm, then implementation is the process of translating the language independence of the "instructions" into concrete code - and there is no "short cut" we can give you that is suitable for every algorithm, and every language. Or even for any algorithm, or any language.

Treat the algorithm as you would any other specification, and work from there.


这篇关于想用C ++代码设计一个新算法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆