C语言算法 [英] Algorithms in C

查看:162
本文介绍了C语言算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是最好的地方或一个链接到学习算法,C语言?你怎么知道何时何地,只需寻找到的问题,使用的算法的实现?

What is the best place or a link to learn algorithms in C? How do you know when and where to use the implementation of algorithms by just looking into the problems?

推荐答案

算法不一定绑定到特定的语言,只是为了澄清,因此任何算法本书将工作的伟大,只要你能理解这个概念是数据结构/算法。

Algorithms aren't necessarily tied to a specific language, just to clarify, so any algorithms book will work great as long as you can understand the concept being the data structure/algorithm.

不过,这似乎是一个不错的选择:算法用C 。我有 C ++相当于我书架上。

That said, this seems like a good choice: Algorithms in C. I have the C++ equivalent on my shelf.

还有一本书,似乎语言无关(纠正我,如果我错了)称为数据结构和放大器;算法的,但我听说这是有点过时了,所以你会错过更近的结构。

There is also a book that seems language agnostic (correct me if I'm wrong) called Data Structures & Algorithm's, though I hear it's a bit dated, so you'll miss out on more recent structures.

不要忘了网上有资料提供给您过多。然而,书通常是这类事情更好。这是因为互联网的资源往往集中在一件事的时间。例如,你需要了解什么大O符号是,然后才能明白它的意思,当我们说一个List度为O(1)固定时间]删除。

Don't forget the internet has a plethora of information available to you. However, books are usually better for these sorts of things. This is because internet resources tend to focus on one thing at a time. For example, you need to understand what Big-O notation is before you can understand what it means when we say a List has O(1) [constant time] removal.

这本书将涵盖这些东西以正确的顺序,但互联网资源将集中在两种大O符号或数据结构,但往往不会轻易连接两个。

A book will cover these things in the correct order, but an internet resource will focus on either Big-O notation or data structures, but often won't easily connect the two.


当谈到使用它,你会主要是进行连接,当涉及到什么,你会做与数据。

When it comes to using it, you'll mostly make the connection when it comes to what you'll be doing with the data.

例如,您可能需要一个矢量(阵列),如果你只需要订购的元素,但是如果你需要有序元素和去除从任何地方(但可以牺牲随机存取),那么一个列表将更为合适,因为它的恒定时间删除。

For example, you might want a vector (array) if you just need ordered elements, but if you need ordered elements and removal from any place (but can sacrifice random access), then a list would be more appropriate, due to it's constant-time removal.

这篇关于C语言算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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